知识卡片
共享库例外应形成较宽边界
每服务独立数据库是微服务的常见拓扑,但原书允许少数需要共同读写同一数据的服务共享库或模式。这些服务应被视为一个更宽的限界上下文:共享表仍会使模式变更需要协调多个服务的部署。原书建议单库共享者不超过五六个,这是作者的经验性建议,不能当通用安全阈值;付款类型和配送方式拆分是书中示例,并非本项目的实际方案。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Microservices Architecture · 查看原书依据
Just because services share a database doesn’t mean there is no bounded context; it just means the architect has formed a broader bounded context.
参考来源
- 位置:《Fundamentals of Software Architecture》原书第18章《Microservices Architecture》(阅读计划第21项,单元13;源文件:`OEBPS/ch18.html`)
- 结论依据:原书图18-14/18-15对比每服务数据库与少数服务共享库;付款类型和配送方式是原书例子,五六个是原书建议。
- 原始内容:Just because services share a database doesn’t mean there is no bounded context; it just means the architect has formed a broader bounded context.