Re:An Alternative Approach to Rate Limiting
by peterhunt on Wednesday April 12, 2017 @04:26PM
(#14101401)
Yes, this is why you want to use a token bucket rate limiter (which for some reason was considered and rejected by the original post). We wrote it up here and have an open-source impl on github that's in production serving hundreds of millions of rate limits: https://medium.com/smyte/rate-limiter-df3408325846
Re:An Alternative Approach to Rate Limiting
by kbenson on Wednesday April 12, 2017 @06:58PM
(#14102530)
I particularly liked a comment about a fairly elegant way to rate limit with a caching proxy[1] in that HN post. When your main application returns a rate limit reached request, cache that in your proxy for a certain amount of time, and once it's timed out of the cache, they'll hit your main app again.
https://stripe.com/blog/rate-limiters
https://news.ycombinator.com/item?id=13997029