lightbulbBook reference: Beyond the books. Original notes kept below; rewrite them in your own words.
2.2.1 Connection Pooling
Opening a TCP + TLS + auth handshake to Postgres on every query is slow. A pool keeps N ready connections and lends them out.
Why it matters
Databases cap connections (often a few hundred). A thousand app workers without a pool will exhaust that limit.
How it is used
Size the pool per instance so instances × pool stays under the DB max. Use a pooler (PgBouncer) in front of Postgres at scale. Return connections promptly — do not hold one across a slow HTTP call.