PgDog is a transaction pooler and logical replication manager that can shard PostgreSQL. Written in Rust, PgDog is fast, secure and can manage hundreds of databases and hundreds of thousands of connections. Documentation 📘 PgDog documentation can be found here. Any questions? Join our Discord. Quick start Kubernetes Helm chart is here. To install it, run: git clone https://github.com/pgdogdev/helm && \ cd helm && \ helm install -f values.yaml pgdog ./ Docker You can try PgDog quickly using Docker. Install Docker Compose and run: docker-compose up It will take a few minutes to build PgDog from source and launch the containers. Once started, you can connect to PgDog with psql (or any other PostgreSQL client): PGPASSWORD=postgres psql -h 127.0.0.1 -p 6432 -U postgres The demo comes with 3 shards and 2 sharded tables: INSERT INTO users (id, email) VALUES ( 1 , ' admin@acme.com ' ); INSERT INTO payments (id, user_id, amount) VALUES ( 1 , 1 , 100 . 0 ); SELECT * FROM users WHERE id = 1 ; SELECT * FROM payments WHERE user_id = 1 ; Monitoring PgDog exposes both the standard PgBouncer-style admin database and an OpenMetrics endpoint. The admin database isn't 100% compatible, so we recommend you use OpenMetrics for monitoring. Example Datadog configuration and dashboard are included. Features Load balancer PgDog is an application layer (OSI Level 7) load balancer for PostgreSQL. It can proxy multiple replicas (and primary) and distribute transactions evenly between databases. It supports multiple strategies, including round robin, random, least active connections, etc. PgDog can also inspect queries and send SELECT queries to replicas, and all others to the primary. This allows to proxy all databases behind a single PgDog deployment. 📘 Load balancer Healthchecks and failover PgDog maintains a real-time list of healthy hosts. When a host fails a healthcheck, it's removed from active rotation and queries are rerouted to other databases. This is similar to HTTP load balancing, e...
First seen: 2025-05-26 17:48
Last seen: 2025-05-27 16:56