What is Connection Pooling?
Reusing a fixed set of open database connections across requests instead of paying the cost of establishing one per query.
Definition
Opening a database connection involves a TCP handshake, TLS negotiation, authentication, and — in PostgreSQL — forking a backend process, which is far too expensive to repeat per request. A connection pool keeps a set of connections open and lends them out: the application borrows one, runs its queries, and returns it. HikariCP dominates the JVM world, while pgbouncer and RDS Proxy pool externally, crucial for serverless functions that would otherwise exhaust the server's connection limit. Pool sizing matters more than intuition suggests; a small pool often outperforms a large one by reducing contention.

