← All projects

PgGate

by @wailbentafat

Active 28

PgGate is a fast PostgreSQL proxy that routes queries to primary or replicas, supports connection pooling, read/write splitting, and ensures safe transactions and session handling.

About this project

PgGate: A High-Performance PostgreSQL Proxy Technical Overview PgGate is a specialized, protocol-aware TCP proxy designed specifically for PostgreSQL database clusters. It serves as an intermediary layer between application services and database nodes, providing intelligent traffic orchestration, connection management, and session state preservation. Unlike general-purpose load balancers, PgGate operates with a deep understanding of the PostgreSQL wire protocol. This allows it to perform real-time query inspection and implement sophisticated routing strategies, such as read/write splitting, while ensuring semantic consistency for the connecting client. Core Capabilities Intelligent Query Dispatch: Automatically routes write operations (INSERT, UPDATE, DELETE) and DDL to the primary node, while dispatching read-only queries (SELECT) to available replicas. Advanced Connection Pooling: Implements efficient connection management for both primary and replica nodes, reducing overhead and improving backend resource utilization.

From the project README on GitHub

Stars
28
Forks
1
Last push
1 Apr 2026

Add this badge to your README

Show that your project is listed on Made in Algeria.

Made in Algeria
[![Made in Algeria](https://www.madeinalgeria.dev/badge/pggate.svg)](https://www.madeinalgeria.dev/projects/pggate)

Related projects