All Questions
Multi Step Processes hard

You have 1,000 workers pulling from a queue. They call a 3rd party API with a rate limit of 500 req/sec total. How do you enforce this limit without a central coordinator bottleneck?

  1. A Hardcode '0.5 req/sec' per worker.
  2. B Token Bucket algorithm in a shared Redis instance.
  3. C Use a Distributed Leaky Bucket.
  4. D Reduce the number of workers to a static number (e.g., 50) where their combined max throughput cannot exceed the limit.

One system design question a day, with spaced repetition so the ones you miss come back.

Get the app

Related questions