Token bucket and leaky bucket
Send bursts of requests through two rate limiters side by side.
Token bucket
Tokens drip in at the rate. A request spends one token, so a full bucket lets a burst through at once.
8 of 8 tokens
- Allowed
- 0
- Rejected
- 0
Leaky bucket
Requests queue in the bucket and leave at a fixed rate. Bursts are smoothed out; overflow is dropped.
0 of 8 queued
- Released
- 0
- Dropped
- 0
- Waiting
- 0
Press Start, then send a burst of 10. The token bucket passes up to 8 immediately and rejects the rest. The leaky bucket accepts up to 8 but releases them one at a time, 2 per second. Clock: 0.0 s.