← 返回起始笔记位置

知识卡片

普通读书笔记卡 · 2313.e.5.f.10.c.1.c.2.a

短轮询用间隔换资源

理解等级:中级

短轮询定时发请求,有数据则返回、无数据也立即返回,等下一间隔再查。实现简单且易通过常规HTTP基础设施,但低频更新时浪费请求,高频检查则加重负载;间隔决定更新等待与资源消耗。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • Event-driven Systems · 查看原书依据

      In short polling, consumers periodically send requests to the message queue to check for new messages. If messages are available, they are retrieved and processed. If the queue is empty, the consumer waits for a short interval before polling again.

    参考来源

    - 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第06章《Event-driven Systems》(来源项目book-sources;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch06.xhtml) - 结论依据:原文的机制或对比支持以下核心判断:短轮询定时发请求,有数据则返回、无数据也立即返回,等下一间隔再查。 本卡将相邻说明中的适用限制保留为解释。 - 原始内容:In short polling, consumers periodically send requests to the message queue to check for new messages. If messages are available, they are retrieved and processed. If the queue is empty, the consumer waits for a short interval before polling again.