PgBouncer vs ProxySQL
PgBouncer
pgbouncer.orgProxySQL
proxysql.comSide by side
| Figure | PgBouncer | ProxySQL |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | — |
| Linux | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 3 |
| Spec score · Database Proxy Software | 7.7 (#11) | 7.3 (#23) |
| Founded | 2007 | 2013 |
Plans
In their own words
PgBouncer
PgBouncer is a self-hosted connection pooler for PostgreSQL. It reuses server connections to lessen the performance cost of opening new ones, and offers session, transaction, and statement pooling. Statement pooling does not allow multi-statement transactions. PgBouncer can send connections to databases on different hosts, but it has no built-in multi-host load balancing or failover detection; DNS round-robin, external TCP load balancers, DNS changes, or external tools are described as alternatives. It can track protocol-level prepared statements in transaction and statement modes when max_prepared_statements is non-zero. Authentication options include client certificates, SCRAM-SHA-256, LDAP, PAM, and HBA-based configuration. The features page lists default memory needs of 2 kB per connection. PgBouncer is free, with source releases and references to native packages and RPM and Debian repositories. It runs on Linux and Windows; MinGW is the documented supported Windows build environment. Building requires Libevent 2.0 or later, pkg-config, and a C11-capable compiler; TLS support also requires OpenSSL.
ProxySQL
ProxySQL is a self-hosted Linux database proxy for MySQL, PostgreSQL and related systems. It scales infrastructure without changes to the application stack or database engine, multiplexing more than 100,000 client connections through a few hundred backend connections. Protocol-aware, regex-based routing can send queries to primary servers, replicas or shards, and can route by user, schema or table. The proxy can cache results without application changes, monitor backend health and reroute traffic during failures. Query mirroring duplicates live traffic for analysis and performance testing, while percentage-based balancing supports gradual shifts. A database firewall is intended to protect against SQL injection and runaway queries. Deployment options include Linux packages, Docker and Kubernetes. ProxySQL is GPLv3-licensed open source, released in 2013. The Community plan is free and includes core features, supported platforms and community channels.