Connection Pool
Question
What is a database connection pool?
Hint
Connection pools avoid the overhead of creating new connections.
Explanation
A connection pool maintains a cache of reusable database connections. Instead of opening a new connection for each request (expensive — involves TCP handshake, authentication, SSL), the application borrows a connection from the pool, uses it, and returns it. Benefits: 1) Faster request handling (no connection setup overhead). 2) Controlled connection count (prevents overwhelming the database). 3) Connection reuse. Configure pool size, timeout, and max lifetime based on load. Too few connections cause queuing; too many overwhelm the database. Libraries: pg-pool (PostgreSQL), HikariCP (Java).
Related Resources
Related Lessons
- Connection Pooling
Learn pooling.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.