知识卡片
池与队列也是容量控制
队列协调不同处理速度,满队列写入与空队列读取都会阻塞;池通过有限线程、连接或对象复用,也限制并发压力。只增加连接池不增加数据库能力,可能把负载压垮到下游。应监控等待、深度和利用率,达到极限时向调用方传递背压,先调锁、池、队列及服务等待,再优化CPU或内存细节。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- 服务端架构 · 查看原书依据
Pools also behave similarly to a queue. It is important to note that pools are often a form of throttling to control the load on the server. For example, a thread pool controls the number of threads created, or a database connection pool controls the number of concurrent requests on the backend server.
参考来源
- 位置:《Software Architecture and Decision-Making》第11章《Server Architectures》(来源项目:book-sources;源文件:extracted/Software Architecture and Decision-Making Leveraging Leadership, Technology, and Product Management to Build Great Products… (Srinath Perera)/_epub-src/ch11.xhtml)
- 结论依据:摘录说明队列协调不同处理速度,满队列写入与空队列读取都会阻塞;池通过有限线程、连接或对象复用,也限制并发压力。其余条件结合本章相邻例子与取舍说明,数字示例不作当前性能承诺。
- 原始内容:Pools also behave similarly to a queue. It is important to note that pools are often a form of throttling to control the load on the server. For example, a thread pool controls the number of threads created, or a database connection pool controls the number of concurrent requests on the backend server.