知识卡片
版本迁移的三种成本
统一迁移(Knot)要求所有客户端同时更新,只有一套线上服务版本,但每轮都要协调使用方。并行版本(Point-to-Point)给予调用方按自己节奏迁移的选择,提供方得分别维护多套线上服务。兼容模式(Compatible)用同一套最新实现服务多份契约,工作集中于适配及验证。
Stripe 示例在新实现完成业务处理后,从新到旧逐个应用版本变换,直到响应符合调用方版本。响应转换通常易隔离,涉及数据副作用的差异较难维护。迁移的总成本还包括调用方重新测试、发布和因中断其他工作产生的机会成本。
结构图:
flowchart LR
K[统一迁移] --> C[所有调用方同步升级]
P[并行版本] --> V[多个服务版本持续运行]
A[兼容模式] --> S[最新服务处理请求]
S --> T[按需转换成旧版响应]
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 破坏性变更与 API 演进 4.10 Costs involved with version migration · 查看原书依据
The second is the Point-to-Point migration pattern, in which different versions of the API services exposing the different API versions are left running in production. Not all API consumers can afford the time and cost involved with migrating immediately, so API consumers are allowed to migrate at their convenience. Some consumers may never migrate if they are satisfied with the existing version.
参考来源
- 位置:《Automating API Delivery APIOps with OpenAPI》《第 04 章 破坏性变更与 API 演进》(4.10 Costs involved with version migration;来源项目 book-source,extracted/Automating API Delivery APIOps with OpenAPI/_epub-src/OEBPS/Text/chapter-4.xhtml#p210)
- 结论依据:从多版本并行模式看维护负担由消费者协调改为服务端并行承担。
- 原始内容:The second is the Point-to-Point migration pattern, in which different versions of the API services exposing the different API versions are left running in production. Not all API consumers can afford the time and cost involved with migrating immediately, so API consumers are allowed to migrate at their convenience. Some consumers may never migrate if they are satisfied with the existing version.