System Design · Middle · Question 38 of 75

How does the token bucket rate limiting algorithm work?

Explanation

Bucket capacity sets the allowed burst, the refill rate sets the average limit. When tokens run out, the server responds with 429. Alternatives: fixed/sliding window, leaky bucket.

Further reading

Problem with a question

System Design · Middle · question 38

Test yourself

Take the System Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz