← 返回刚才阅读的位置

知识卡片

普通读书笔记卡 · 3327.w

数据库边界追随团队边界

理解等级:高级

两个团队直接访问同一schema,一方变更就迫使另一方协商修改,削弱独立发布。可让一个服务成为写入责任者,通过消息交换必要数据;若两个服务都须更新同一事务数据,要比较合并边界、跨服务事务和接受最终一致的成本。不能为“每服务一库”口号忽略真实一致性需求,边界应兼顾协作成本与数据同步复杂度。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    参考来源

    - 位置:《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) - 结论依据:摘录说明两个团队直接访问同一schema,一方变更就迫使另一方协商修改,削弱独立发布。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。 - 原始内容:Each microservice should have its own database, and two microservices must not share data via the same database. This rule removes a common cause that leads to tight coupling between services.