知识卡片
熔断让故障依赖快速失败
依赖持续失败时继续调用会浪费线程、连接和时间。熔断器记录失败并暂时拒绝真实调用,按契约快速返回可解释错误;经过等待再探测恢复,避免不断冲击故障依赖。原书闭包是机制示意,计数阈值、并发保护和探测额度需另行明确,不能把未经核验的样例当作生产实现。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Cloud Native Patterns · 查看原书依据
Breaker can have two states. In the closed state everything is functioning normally. All requests received from the client by Breaker are forwarded unchanged to Circuit, and all responses from Circuit are forwarded back to the client. In the open state, Breaker doesn’t forward requests to Circuit. Instead it “fails fast” by responding with an
参考来源
- 位置:《Cloud Native Go》第04章《Cloud Native Patterns》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch04.xhtml)
- 结论依据:依赖持续失败时继续调用会浪费线程、连接和时间。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。
- 原始内容:Breaker can have two states. In the closed state everything is functioning normally. All requests received from the client by Breaker are forwarded unchanged to Circuit, and all responses from Circuit are forwarded back to the client. In the open state, Breaker doesn’t forward requests to Circuit. Instead it “fails fast” by responding with an