知识卡片
服务规模两端都有代价
服务过大可能聚集过多职责、耦合本应独立的部分;过小则可能把复杂度分散到跨服务与跨团队协调中,同样拖慢交付。合理粒度取决于职责边界和协作成本,不能由代码量或服务数单独决定。拆分前应先确认瓶颈会被缓解,还是仅换了位置。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Principles of Software Architecture Modernization》第1章《What’s Wrong with Monoliths?》(源文件:`_epub-src/OPS/ch01.xhtml`,归一化正文 [12444:16591))
- 结论依据:原文并列描述服务过大导致职责与耦合风险、过小导致跨团队协调和技术债风险,并指出拆分会移动而非自动消除固有复杂度。
- 原始内容:Being too big, you risk having too much responsibility or features, or coupling items that should not be coupled; being too small, you could make the wrong tradeoff in organizing your complexity 5 , creating coordination issues across teams, technical debt, and causing the organization to move slower. In short, judging the impact of size on a software architecture is a complex decision.