Design Rate Limiter | Dig Deep
6999

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:

  1. Api crashes at 1000 request per second. How do I determine the rate at which the requests are prevented. 1000? 800? and why.
  2. Api has 1:3 requests for POST and GET. How to determine rate limit with this information.
  3. Where to deploy the rate limiter? How to reduce network calls?

Thought it was easy but I messed it up.

Comments (6)