知识卡片
回退还需前向兼容策略
新调用方已发送v2消息,提供方故障退回v1时,旧接口能否接受新消息就是本章的前向兼容问题。可以预建适配回退、需要时再做,或放弃接口降级而修复故障;前两者也不能保证v2新功能仍可用。先仅开放一个依赖方验证可减小影响面。应在升级前确定风险和修复责任,不能假定保留旧二进制就拥有可用回滚。
两类兼容方向不同,[[向后兼容支持独立升级]]处理新提供方接旧消息,这里处理降级后旧提供方接新消息。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 宏观架构中的微服务决策 · 查看原书依据
Consider microservice C, which is using A.v2. If, at some point, A.v2 runs into an issue, and you need to revert the API back to A.v1, then microservice C must be able to send messages intended for A.v2 to A.v1.
参考来源
- 位置:《Software Architecture and Decision-Making》第10章《Macro Architecture: Microservices Considerations》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch10.xhtml)
- 结论依据:摘录说明新调用方已发送v2消息,提供方故障退回v1时,旧接口能否接受新消息就是本章的前向兼容问题。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。
- 原始内容:Consider microservice C, which is using A.v2. If, at some point, A.v2 runs into an issue, and you need to revert the API back to A.v1, then microservice C must be able to send messages intended for A.v2 to A.v1.