Connection pooling operates at two architectural tiers:
- 1Client-Side Pools (HikariCP, pg-pool): Multiplex local application worker threads across a fixed set of database sockets within a single application process.
- 2Central Proxy Poolers (PgBouncer, Odyssey): Consolidate thousands of distributed microservice client sockets into a small, bounded set of database backends.
In transaction pooling mode, a server connection is assigned strictly for the duration of an active transaction. The degree of connection consolidation is directly governed by the workload's active-to-idle duty cycle: microservices executing brief queries interspersed with business logic achieve massive multiplexing efficiency, whereas continuous long-running transactions yield smaller consolidation benefits.
TIP
Architectural Deep Dive: For two-tier pooling mechanics and sizing formulas, see: PostgreSQL Connection Management: Lifecycle, Capacity, and Pooling.