mcavage/node-restify — Issue #83: Question re. Throttling
Author: cliftonc
Created: 2012-02-23 07:17:04+00:00
State: open

Hi, this looks like an absolutely cracking project, so great work! Saw it on DailyJS this morning.

Quick question re. throttling. I have an application that is currently express based, but is basically an app that is 99% restful apis, and wanted to switch to this. One of the big things I liked is the throttling, but had a question re. use.

e.g. I have a service (it does a form of click tracking) that can take over 1000 / tps, from users across the globe and is very high profile, hence we get lots of people often trying to break it.

The current throttling implementation looks like it will create an in memory hash for all of those users, that is never actually cleared by any background cleanup job? Does this mean that over time it will eventually just fill up and fall over or am I missing something?

I was considering changing the implementation slightly to use a Redis backed set for the TokenBucket with a TTL on the key (e.g. of a minute), so it never got too large? But if the above issue isn't correct I won't bother :)

Thanks,
Clifton