知识卡片
令牌桶容许有限突发
令牌以固定速率补充到有容量上限的桶,每次请求消耗令牌。桶容量控制一次突发空间,补充速率控制长期平均;空桶时拒绝或等待。容量大不等于持续处理能力大,下游仍需承受允许的峰值。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Building Resilient Systems · 查看原书依据
Token Bucket algorithm: Token Bucket algorithm stands out for its flexibility and effectiveness in handling burst traffic while maintaining long-term rate limits. The algorithm is particularly valuable in e-commerce scenarios where legitimate users might have burst patterns of activity, such as adding multiple items to cart quickly then being inactive.
参考来源
- 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第08章《Building Resilient Systems》(来源项目book-sources;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch08.xhtml)
- 结论依据:原文的机制或对比支持以下核心判断:令牌以固定速率补充到有容量上限的桶,每次请求消耗令牌。 本卡将相邻说明中的适用限制保留为解释。
- 原始内容:Token Bucket algorithm: Token Bucket algorithm stands out for its flexibility and effectiveness in handling burst traffic while maintaining long-term rate limits. The algorithm is particularly valuable in e-commerce scenarios where legitimate users might have burst patterns of activity, such as adding multiple items to cart quickly then being inactive.