Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Pro

Configuring a Token Bucket for Burst and Sustained Rate

A public API wants: sustained rate of 600 requests/min per API key, with clients allowed to burst up to 40 requests instantly after being idle.

  1. Give the token bucket parameters (r, B) that satisfy this.
  2. A client has been idle for 10 minutes, then sends 40 requests in the same millisecond, then continues at a steady 15 requests/s. Walk through what the bucket does for the first 3 seconds of the steady phase (state after each second is enough).
  3. A different client sends exactly 10 requests/s forever, never bursting. Does it ever get denied? Explain using the bucket math.

Share this question

← Back to Rate Limiting practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.