Skip to main content
The bucket holds limit tokens. Each allowed request spends one. Tokens refill at limit / duration — so a limit of 10 per 60 seconds refills one token every 6 seconds. The bucket never goes above limit.

When to use it

APIs that should tolerate a burst, then settle. A user who was idle can dump limit requests immediately. After that, they wait for refill.

Burst

On first use, the bucket is full. That’s the burst. If you don’t want that, use leaky bucket.

Shape

number
Whole tokens left after this request.
number
When the bucket will be full again — not when the next single token arrives.