Hasty Briefsbeta

Bilingual

PgDog – connection pooler and load balancer for Postgres

5 hours ago
  • #Database Proxy
  • #PostgreSQL
  • #Scalability
  • PgDog is a drop-in PostgreSQL proxy requiring no application changes, offering three main tools: a connection pooler, a load balancer, and distributed database sharding capabilities.
  • As a connection pooler, it shares few Postgres connections among many clients (100,000+), supports session states like SET commands and advisory locks, enables multi-threading and async processing (50,000+ transactions/s per thread), and handles prepared statements with zero overhead.
  • As a load balancer, it distributes reads across replicas, performs health checks to block outdated replicas, detects failovers to redirect write traffic, and splits read/write queries using Postgres SQL parser for compatibility.
  • As a distributed database, it shards Postgres transparently by extracting sharding keys from queries, supports fast OLTP and OLAP operations (e.g., GROUP BY, COUNT()), allows flexible sharding configurations, and maintains ACID compliance with features like cross-shard transactions and replicated tables.
  • It supports cross-shard transactions with atomic rollbacks, replicated tables for shard-local joins, integer primary keys without needing UUIDs, sharding key mutations via UPDATE statements, and consistent schema management across shards.
  • User testimonials highlight benefits like easier implementation, 100% uptime, scalability to thousands of pods, reliability surpassing RDS Proxy, simplified sharding configurations, and improved query performance with billions of rows in production.