Overview of PgDog capabilities
PgDog is a high-performance tool written in Rust that acts as a transparent layer between applications and PostgreSQL databases. It provides three primary functions:
- Connection Pooling: Multiplexes thousands of application connections over a small number of server connections, supporting SET statements, LISTEN/NOTIFY, and advisory locks without breaking connection state.
- Load Balancing: Distributes read queries across read replicas using built-in algorithms, allowing read scaling without application changes or external infrastructure like HAProxy.
- Sharding: Enables horizontal scaling by splitting tables and indices across multiple machines, automatically routing queries and managing data migration via the PostgreSQL logical replication protocol.