← 返回刚才阅读的位置

知识卡片

问题卡 · 4410

漏桶平滑处理速率

理解等级:中级

请求进入有界先进先出队列,再以稳定速率离开;队列满时拒绝新请求。它能平滑下游负载,但突发请求会增加等待,老请求占满队列时也可能排斥更新的请求。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • 限流器 · 查看原书依据

      Leaking bucket algorithm The leaking bucket algorithm is similar to the token bucket except that requests are processed at a fixed rate. It is usually implemented with a first-in-first-out (FIFO) queue. The algorithm works as follows: •When a request arrives, the system checks if the queue is full. If it is not full, the request is added to the queue. •Otherwise, the request is dropped.

    参考来源

    - 位置:《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) - 结论依据:原文在该位置给出所述对象、机制或比较,支持本卡的解释;原书未展开的实现不作为已证明结论,算式与一致性边界在正文明确限定。 - 原始内容:Leaking bucket algorithm The leaking bucket algorithm is similar to the token bucket except that requests are processed at a fixed rate. It is usually implemented with a first-in-first-out (FIFO) queue. The algorithm works as follows: •When a request arrives, the system checks if the queue is full. If it is not full, the request is added to the queue. •Otherwise, the request is dropped.