Token Bucket
Version 1.0.0 · Updated 2026-07-30
CORE DEFINITION
An algorithm that fills a "bucket" with tokens at a fixed rate. Each data packet must consume a token to be sent. If the bucket is empty, it must wait for new tokens to be generated. This allows more data to be sent during bursts, but the long-term average rate is limited.
SCAFFOLDING EFFECT
Reduce cognitive load
Smooth burst traffic. In resource allocation, it is necessary to ensure fairness (long-term average rate) while allowing occasional "sprints" (burst traffic). This is the core idea of all "elastic" quota systems.
Anchor fast decisions
Tokens are added to the bucket at a fixed rate. Each request consumes one token; if the bucket is empty, requests are rate-limited or queued. The bucket capacity allows short bursts, while the long-term average rate is constrained by the fill rate, balancing fairness and elasticity.
MINIMUM ACTION
In progress 0/4Practice this model in one real situation:
account_treeGenealogyexpand_more
menu_bookReferencesexpand_more
Source support: Explicit
- en.wikipedia.orghttps://en.wikipedia.org/wiki/Token_bucketverified
PRIVATE NOTES · Only visible to you
SAVED Q&A
ENTRY Q&A · Private saving available
Ask with a clear boundary
thinkingmodels answers from published entry context only.
Your question is sent to thinkingmodels. The answer uses public entry context only.
RELATED MODELS