Token bucket
A rate limiting algorithm where each request spends 1 token from a bucket that refills.
Example
A 20-token bucket that refills with 5 per second lets bursts of 20 through.
Test yourself: Token bucket
Rate limiting algorithms
In a token bucket, each request needs a ___ to get through.
With 10 tokens in the bucket, 10 requests get in; request 11 is rejected until the refill adds another token.
0/1
â–¶ Play