Open-source PostgreSQL scaling proxy providing connection pooling, load balancing, and automatic sharding without application code changes.
PgDog is an open-source single-executable proxy for PostgreSQL that handles connection pooling in real transaction mode (sharing a few Postgres connections among 100,000+ clients without losing session features), load balancing across read replicas with health checks and failover detection, and automatic sharding that reads sharding keys directly from queries. It supports ACID-compliant cross-shard transactions using two-phase commit and analytical queries including GROUP BY, COUNT, and ORDER BY via scatter/gather processing. PgDog has been used in production with 20TB+ of sharded data and 3M+ queries per second. PgDog is a product of PgDog.
For people
For agents