Algorithms

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.

Lessons that use it

More algorithms terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.