知识卡片

问题卡 · 4409

令牌桶容许有限突发

理解等级:高级

桶以固定速率补充令牌,最多保留桶容量个;请求取得令牌才被放行。补充速率限制长期平均量,容量决定短期突发上限。桶满后多余令牌丢弃,因此空闲不会无限积累额度。

这张卡片看不懂?

已有反馈 · 0 / 10 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 限流器 · 查看原书依据

      The token bucket algorithm work as follows: •A token bucket is a container that has pre-defined capacity. Tokens are put in the bucket at preset rates periodically. Once the bucket is full, no more tokens are added. As shown in Figure 4-4, the token bucket capacity is 4. The refiller puts 2 tokens into the bucket every second. Once the bucket is full, extra tokens

    参考来源

    - 位置:《System Design Interview – An insiders guide, Second Edition》第04章《限流器》(来源项目 book-sources;源文件:extracted/System Design Interview – An insiders guide, Second Edition/_epub-src/text/part0009_split_002.html) - 结论依据:原文在该位置给出所述对象、机制或比较,支持本卡的解释;原书未展开的实现不作为已证明结论,算式与一致性边界在正文明确限定。 - 原始内容:The token bucket algorithm work as follows: •A token bucket is a container that has pre-defined capacity. Tokens are put in the bucket at preset rates periodically. Once the bucket is full, no more tokens are added. As shown in Figure 4-4, the token bucket capacity is 4. The refiller puts 2 tokens into the bucket every second. Once the bucket is full, extra tokens