What is Connection Pooling, and why is it necessary for high-scale applications?
Last updated
Connection pooling keeps a fixed set of open DB connections that requests borrow and return, instead of opening a new one per request.
New connections are expensive (TCP handshake, authentication, server memory), so reuse cuts latency and overhead.
Databases have a hard max-connections limit. A pool caps concurrency so thousands of clients don't exhaust it (e.g. HikariCP, PgBouncer).
- https://www.prisma.io/dataguide/database-tools/connection-pooling
- https://medium.com/@gupta-rahul/understanding-database-connection-pooling-a-practical-guide-for-developers-3fde64dd96e8
- https://medium.com/@aggelosbellos/database-connection-pooling-optimizing-database-interactions-for-performance-and-scalability-62d95a1f7b4c
- https://docs.aws.amazon.com/prescriptive-guidance/latest/hyperscale-aurora-mysql/manage-connections.html
- https://docs.aws.amazon.com/fr_fr/whitepapers/latest/amazon-aurora-mysql-db-admin-handbook/common-misconceptions.html
- https://docs.digitalocean.com/products/databases/postgresql/how-to/manage-connection-pools/
- https://www.digitalocean.com/community/tutorials/connection-pooling-in-java
- https://algomaster.io/learn/system-design/connection-pooling