Glossary

Connection Pool

A connection pool is a set of pre-established database connections that are reused between requests. Opening a new DB connection is expensive (TCP handshake, authentication). The pool lets you grab a ready connection instead of creating a new one.

How it works

On startup, the application opens N connections. Each request takes a connection from the pool, uses it, and returns it. If all connections are busy, the request waits or receives a timeout error.

Key parameters

PHP and persistent connections

PHP-FPM + MySQL: each worker has its own pool. For centralised pooling across workers, use PgBouncer (PostgreSQL) or ProxySQL (MySQL).