知识卡片
服务扩容会推高数据库连接数
服务实例可随负载增加,单体共享数据库却未必能同步扩容。每个实例通常持有数据库连接;实例数增长会推高连接总量,连接耗尽时请求先等待,继而可能超时。因此评估微服务弹性不能只看计算实例,还应核算数据库连接池和数据库容量。原书讨论的是共享单库拓扑的风险,不能据此断言每次扩容都会超时。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Microservices Architecture · 查看原书依据
As the number of services and service instances increase, the services can quickly run out of available database connections, resulting in further connection waits and request timeouts.
参考来源
- 位置:《Fundamentals of Software Architecture》原书第18章《Microservices Architecture》(阅读计划第21项,单元13;源文件:`OEBPS/ch18.html`)
- 结论依据:原书明确说明服务实例增长可能耗尽共享数据库连接,造成等待与超时;容量核算是机制推断。
- 原始内容:As the number of services and service instances increase, the services can quickly run out of available database connections, resulting in further connection waits and request timeouts.