知识卡片
账号分组会改变对外契约粒度
按领域共用账号和网关时,对外可呈现更粗的稳定契约;内部服务数量和实现可变化。规划账号边界时,需同时考虑消费者看到的接口、访问控制及迁移自由度。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
原书出处
参考来源
- 位置:《Principles of Software Architecture Modernization》第8章《Embracing New Technology》(源文件:`_epub-src/OPS/ch08.xhtml`,归一化正文 [16791:21124))
- 结论依据:原文指出账号组织形式会影响 API 网关所暴露的契约粒度。
- 原始内容:A very subtle point to understand is how the number of accounts you have can influence the granularity of your contracts. ( Figure 8.7 ) In every case, your services need to be exposed using an API gateway, and from an outsider’s perspective they just see one public contract that the API gateway exposes. So, if you have one service per account you have achieved the smallest granularity possible, and you are exposing one public contract per service (at least).