知识卡片
超时与截止时间的分工
超时限制一次等待,截止时间限制整项请求能花费的总时长,包含重试和回退。二者共同避免依赖无响应时长期占用资源;即使每次调用未超时,多次重试累积也可能超过用户可接受的等待。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Architecture of Distributed Systems · 查看原书依据
Set appropriate timeouts and deadlines for requests to prevent them from hanging indefinitely. Timeouts ensure that services do not wait too long for a response and can move on to serving other requests. Deadlines specify the maximum time allowed for a request to complete, including all retries and fallbacks.
参考来源
- 位置:《Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…》第03章《Architecture of Distributed Systems》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Building Distributed Systems Designing scalable architectures with microservices, event-driven patterns, and robust deployment…/_epub-src/OPS/ch03.xhtml)
- 结论依据:原文给出本卡对象的职责及相关使用情境,本卡保留相应边界,不将具体产品功能或概述推广为无条件保证。
- 原始内容:Set appropriate timeouts and deadlines for requests to prevent them from hanging indefinitely. Timeouts ensure that services do not wait too long for a response and can move on to serving other requests. Deadlines specify the maximum time allowed for a request to complete, including all retries and fallbacks.