Fundamentals · Medium · Free
What is a connection pool and why not open a new connection per request?
FresherFundamentalsDatabase Fundamentals
Connection pooling
Opening DB TCP+auth is expensive. Pool keeps warm connections reused across requests—cap pool size to protect DB.
- HikariCP in Java
- Pool exhaustion → timeouts
- Size ≈ concurrent queries not thread count
One connection per HTTP request does not scale.