PgBouncer is a lightweight middleware proxy server and connection pooler for PostgreSQL. It acts as a database connection manager and load balancer, reducing system overhead by managing a pool of reusable connections and distributing incoming traffic across multiple backend servers.
The project distinguishes itself through a protocol-level proxying approach that handles authentication and TLS encryption without parsing underlying SQL queries. It provides specialized support for mapping named prepared statements across different backend connections and implements a socket-sharing process model to distribute network traffic across multiple CPU cores.
The software covers a broad range of resource management capabilities, including concurrent connection limiting, idle connection timeouts, and various connection assignment strategies. It integrates centralized authentication via LDAP and PAM, offers real-time connection state inspection, and supports zero-downtime process restarts and graceful shutdowns.
The system integrates with systemd on Linux and as a service on Windows for automated lifecycle management.