AlgoPlus//structures / rate-limiting
Read the theory

Rate Limiting · Token Bucket

Absorb bursts up to a capacity, then throttle to the refill rate.

Capacity
6
Allowed
0
Dropped
0
Legend
Token
Allowed
Dropped (429)
AI Tutor Workspace
In a nutshell
Rate limiting caps how fast a client can make requests so one user can't overwhelm a service. The token-bucket method holds a fixed number of tokens that refill at a steady rate; each request spends one. A full bucket lets a short burst through instantly, then requests are throttled to the refill rate, and once it's empty extra requests are rejected.
Ready
Press play to begin the cinematic walkthrough.
A token bucket starts full and refills steadily. Each request spends a token; when it's empty, requests are rejected — so bursts are absorbed up to the capacity, then smoothed to the refill rate.
Key terms
Go deeper in the lesson
Read the full theory, intuition & complexity for Rate Limiting · Token Bucket.