PgBouncer Connection Pooling and Routing
summary
PGbouncer sits between apps and Postgres as a lightweight proxy that handles thousands of concurrent connections on one CPU, drops DB concurrency by mapping many client connections to a few server connections with transaction pooling maps clients to server connections, and supports pause/reload/resume for near-zero downtime cutovers during logical replication. It transparently transfers connections between pgbouncer instances for online upgrades, offers session/transaction pooling, per-user and per-db limits, a reserve pool for spikes, TLS and md5 auth, monitoring via the pgbouncer database, and prepared-statement support is in progress.
AI-written summary · about
chapters (11)
- 0:00Intro
- 4:22Usecases
- 7:36Pool modes
- 10:10Connection mapping
- 13:19Connection limits
- 17:57Authentication
- 20:17pgbouncer database
- 23:38How connection is processed
- 25:48Performance
- 29:41Online Upgrade
- 34:27Alternatives
related talks
53mPgBouncer: Present and Future
20mElephant by the pool: PostgreSQL connection poolers overview
44mPgBouncer and 20000 TPS at one node: advanced tuning, hacks and problem solving
42mDo it in SQL: pgbouncer_wrapper
59mComparing Connection Poolers for PostgreSQL
25mFollow my Leader connecting Postgres client applications after server failover
23mComparing Postgres connection pooler support for prepared statements
13mA Deep Dive into the DB Connection Pool
