Closed facultymatt closed 10 years ago
Just to clarify, are you writing clients for an existing public API and you want to limit your clients, or are you writing a public API that will have multiple clients connecting and you want to rate limit each client?
b, Im writing a public API that will have multiple clients connecting and you want to rate limit each client.
Apologies for this falling off my plate, but a similar question was just asked in issue #8 where I posted some ideas on getting started. Like I said in that thread, the full implementation of what you're asking for is out of scope for this project but it likely involves a per-IP or per-apiKey expiring cache of rate limiter objects. If your setup involves a cluster of web servers you would need some policy that maps clients with the same apiKey to the same webserver to properly enforce the rate limit.
Take a look at https://github.com/visionmedia/node-ratelimiter
I have the following situation,
How would I configure node-rate-limiter for this setup?