Each request opens its own new connection. Setup is slow, often tens of milliseconds.
Each connection uses memory on the database, so too many hurt it.
At its limit, the database refuses new connections. Customers see errors.
Opening a connection is slow, so open a few and reuse them.
The database can only handle so many connections.
When all are busy, requests wait, so set timeouts.
Reach for it when
In almost every backend that talks to a database: opening a connection can take tens of milliseconds, so reuse a few.
The catch
Ten connections shared by twenty requests means ten wait in line, and one slow query holding a connection makes everyone queue.
Say it in an interview“I would use a connection pool sized to what the database can handle, with a wait timeout, and keep queries short so connections return quickly.”