System Design
token bucket
refill r, hold B, spend 1 per request
Source board
This definition comes from the board below. Open it to see the term in context.
Also defined on Design Claude in the Interview, Design OpenRouter in the Interview, Design a Rate Limiter.
Try it
The bouncer at the door, the lab built from this board.
More terms from this board
- 429Too Many Requests
- backoffwait longer each retry (+ jitter)
- bursta short spike
- distributed limitshared redis count, usually approximate
- fixed / sliding windowcount per clock-bucket / over a moving window
- leaky bucketqueue drains at a constant rate
- per-keytracked per user/IP/API-key
- rate limitcap on requests per key per window
- Retry-Afterwhen to try again
- throttlingslow/reject once over the cap