PgBouncer vs ShardingSphere-Proxy
PgBouncer
pgbouncer.orgShardingSphere-Proxy
shardingsphere.apache.orgSide by side
| Figure | PgBouncer | ShardingSphere-Proxy |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Windows | Yes | Yes |
| macOS | — | Yes |
| Linux | Yes | Yes |
| Self-hosted | Yes | Yes |
| Plans published | 1 | 1 |
| Spec score · Database Proxy Software | 7.7 (#11) | 7.5 (#19) |
| Founded | 2007 | 2018 |
| Purpose | PgBouncer is a PostgreSQL connection pooler that reuses server connections to reduce the performance impact of opening new connections. | ShardingSphere-Proxy is a transparent database proxy that provides a database server using a binary protocol for heterogeneous programming languages. |
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.
ShardingSphere-Proxy
ShardingSphere-Proxy is a self-hosted database proxy that gives clients a database server interface over a binary protocol. Its listed client protocols are MySQL, PostgreSQL, openGauss, and Firebird. It distributes storage and computing across underlying databases through sharding, and provides distributed transactions with a hybrid XA and BASE engine. Read/write splitting balances reads using SQL semantics and awareness of database topology. Other capabilities include migration with sharding, federated queries, transparent encryption, and data masking.
You can deploy it from a binary distribution, as a Docker image, or with Helm. The binary requires Java JRE 8 or higher; Docker needs no additional dependency. For a MySQL backend, the Proxy ext-lib directory needs mysql-connector-j-8.4.0.jar. The project is free at free. Support for system databases and tables such as information_schema and pg_catalog is limited, and some graphical database clients may show errors.