Expand description
The connection pool.
Opening a connection costs a TCP handshake plus authentication, whatever the database, which is far too much to pay per request. The pool keeps a small set alive and hands them out, discarding any that broke or that a handler left inside a transaction.
It knows nothing about any particular database: it holds a Driver, and
the driver knows the protocol.
Structsยง
- Pool
- Pooled
Connection - A connection borrowed from the pool, returned when dropped.