知识卡片
重试只适合可恢复失败
短暂失败可能在稍后重试成功,包装器可限制尝试次数并在间隔内观察取消。重试次数为零仍执行首次操作,不等于不执行。补充边界:需区分永久失败与暂时失败,并确认重复动作安全;若副作用已经发生但响应丢失,盲目重试可能重复业务效果。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Cloud Native Patterns · 查看原书依据
These faults typically resolve themselves after a bit of time, so repeating the request after a reasonable delay is likely to be successful. Failing to account for transient faults can lead to a system that’s unnecessarily brittle. On the other hand, implementing an automatic retry strategy can considerably improve the stability of the service that
参考来源
- 位置:《Cloud Native Go》第04章《Cloud Native Patterns》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch04.xhtml)
- 结论依据:短暂失败可能在稍后重试成功,包装器可限制尝试次数并在间隔内观察取消。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。
- 原始内容:These faults typically resolve themselves after a bit of time, so repeating the request after a reasonable delay is likely to be successful. Failing to account for transient faults can lead to a system that’s unnecessarily brittle. On the other hand, implementing an automatic retry strategy can considerably improve the stability of the service that