知识卡片
幂等让重试安全
幂等操作重复执行与执行一次具有相同结果:设置X为5是幂等,自增则不是。请求失败可能只意味着响应丢失,重试不能假设原操作没发生。将操作设计成幂等可简化恢复,但该性质需覆盖要保护的业务效果,不能只看接口名称。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Chapter 2. Important Distributed System Concepts · 查看原书依据
Idempotency is the notion that whether an action is performed a single time or many times, the result is identical. An example of an idempotent operation is the statement X = 5. No matter how many times you execute that operation, the result is the same. X always
参考来源
- 位置:《Designing Distributed Systems, 2nd Edition》第02章《Chapter 2. Important Distributed System Concepts》(来源项目 book-sources;源文件:extracted/Designing Distributed Systems, 2nd Edition/_epub-src/OEBPS/ch02.html)
- 结论依据:原文用赋值与自增对比结果,并将幂等与失败后的重复尝试联系。
- 原始内容:Idempotency is the notion that whether an action is performed a single time or many times, the result is identical. An example of an idempotent operation is the statement X = 5. No matter how many times you execute that operation, the result is the same. X always