All Questions
Dealing With Contention hard

What is the key difference between a Semaphore and a Rate Limiter (Token Bucket)?

  1. A They are the same.
  2. B Semaphores are for disk, Rate Limiters are for network.
  3. C Semaphores limit *concurrency* (Parallelism: how many active *now*). Rate Limiters limit *throughput* (Rate: how many *per second*).
  4. D Rate limiters block threads.

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

Get the app

Related questions