# pgdogdev/pgdog

PostgreSQL connection pooler, load balancer and database sharder.

Repository: https://github.com/pgdogdev/pgdog
Canonical: https://ross.abutalabs.com/products/pgdog
Homepage: https://pgdog.dev
Language: Rust
License: AGPL-3.0
License Family: copyleft
Topics: load-balancer, pooler, postgresql, rust, sharding
Last push: 2026-08-26T23:16:14+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 98, longevity 43
- inputs: {"age_days": 614, "days_push": 7, "days_rel": 13, "gap_med": 6.0, "n_releases_24m": 53}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5446, forks 267 (observed 2026-08-28T04:09:18.418967+00:00)

## What it is
PgDog is a PostgreSQL proxy written in Rust that combines connection pooling, query load balancing, and database sharding in a single binary. It sits transparently between applications and PostgreSQL, speaking the native wire protocol and SQL parser so no application changes are required.

## Use cases
- pool postgres connections for thousands of app clients
- split read queries to replicas and writes to primary
- shard a postgresql database across multiple servers
- replace pgbouncer while keeping SET and LISTEN/NOTIFY working
- load balance reads across postgres replicas with health checks
- deploy a single database endpoint for kubernetes workloads
- detect primary failover and reroute write traffic

## When to choose
- you need transaction-mode pooling that preserves session state like SET, advisory locks, and LISTEN/NOTIFY
- you want read/write splitting and replica load balancing behind one endpoint
- you need to scale Postgres horizontally with sharding without changing application code
- you want a fast, multithreaded pooler deployable via Docker, Helm, or Terraform

## When to avoid
- you run a small database with few connections where a proxy adds unnecessary complexity
- you rely on sharding features still marked experimental in the docs
- you need a pooler for databases other than PostgreSQL
- your license requirements are incompatible with AGPL-3.0

## Facets
- artifact type: service
- maturity: active
- function: database, proxy, load-testing, routing, networking
- domain: databases, microservices, backend, self-hosted
- platform: rust, self-hosted, cloud
- tags: postgresql, connection-pooler, sharding, load-balancer, pgbouncer-alternative, read-write-splitting, database-proxy, devops, linux, macos, docker, kubernetes

## Member repositories
- pgdogdev/pgdog (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:18.418967+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:56:51.042484+00:00, confidence not recorded.
  - readme: https://github.com/pgdogdev/pgdog (fetched 2026-08-28T04:09:18.418967+00:00, sha 8af87322954b)
  - homepage: https://pgdog.dev (fetched 2026-08-29T08:52:02.047884+00:00, sha b203ba712a6e)
  - site_page: https://docs.pgdog.dev/features/load-balancer (fetched 2026-08-29T08:52:02.062552+00:00, sha 6a8aeecaa8fc)
  - site_page: https://docs.pgdog.dev (fetched 2026-08-29T08:52:02.056876+00:00, sha 746601c6ab15)
  - site_page: https://docs.pgdog.dev/installation (fetched 2026-08-29T08:52:02.058715+00:00, sha c5e9e08f3a33)
  - site_page: https://docs.pgdog.dev/features/connection-pooler (fetched 2026-08-29T08:52:02.060404+00:00, sha eafee0382f5d)
  - site_page: https://docs.pgdog.dev/features/sharding (fetched 2026-08-29T08:52:02.064407+00:00, sha 5ee6f04978a2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
