知识卡片
史诗Saga的补偿代价
Epic Saga采用同步、整体原子目标和编排。协调器串行调用服务;后续服务失败时,向已成功服务发送补偿请求,试图恢复之前状态。这最像单体事务,但补偿是新的业务写入,并非数据库回滚的等价保证。协调器要等待参与者和修复完成,带来吞吐与扩容瓶颈;熟悉的模式名称不能证明分布式失败窗口已经解决。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 事务Saga · 查看原书依据
Because the goal of the Epic Saga(sao) is atomic consistency, the mediator must utilize compensating transactions and request that the other two services undo the operation from before, returning the overall state to what it was before the transaction started.
参考来源
- 位置:《Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)》第12章《Chapter 12. Transactional Sagas》(来源项目:book-sources;源文件:extracted/Software Architecture The Hard Parts Modern Trade-Off Analyses for Distributed Architectures (Neal Ford, Mark Richards, Pramod Sadalage etc.)/_epub-src/OEBPS/ch12.xhtml)
- 结论依据:原文的定义、示例或失败路径支持以下归纳:Epic Saga采用同步、整体原子目标和编排。 其他条件结合本章同小节说明;不将模式目标当成已有运行保证。
- 原始内容:Because the goal of the Epic Saga(sao) is atomic consistency, the mediator must utilize compensating transactions and request that the other two services undo the operation from before, returning the overall state to what it was before the transaction started.