知识卡片
拆分单体数据先迁写者再迁读者
按领域拆分共享库时,先盘点每张表所有读写方,建立新服务契约,逐个迁移写者,再迁移读者。最后核实所有调用已切换,删除旧代码和旧数据。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Principles of Software Architecture Modernization》第10章《Data Migrations》(源文件:`_epub-src/OPS/ch10.xhtml`,归一化正文 [37873:42127))
- 结论依据:原文给出绞杀迁移的读写方清单和先写后读的顺序。
- 原始内容:the recommendation is you move the writers first and the readers later. You will need to move each writer one by one. As before, you must choose if you do schema first or multiple migrations; let us assume you go with schema first. So now we must apply the dual write on the classical monolith and move one of the writers to the new proper service.