I was asked to design a rate limiter.
The idea was easy and I implemented TokenBucket Algorithm.
Ask is to design a rate limitter for one single application not on the basis of IP addresess, just incoming requests.
The tough part is this:
- Api crashes at 1000 request per second. How do I determine the rate at which the requests are prevented. 1000? 800? and why.
- Api has 1:3 requests for POST and GET. How to determine rate limit with this information.
- Where to deploy the rate limiter? How to reduce network calls?
Thought it was easy but I messed it up.
Comments (7)


