Skip to content

Add patroni_proxy - high-performance TCP proxy for Patroni clusters - #73

Merged
vadv merged 17 commits into
masterfrom
patroni_proxy
Jan 11, 2026
Merged

vadv merged 17 commits into
masterfrom
patroni_proxy

Conversation

@vadv

@vadv vadv commented Jan 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

This PR introduces patroni_proxy — a specialized high-performance TCP proxy for Patroni-managed PostgreSQL clusters. Following the Unix philosophy of "do one thing and do it well", it focuses exclusively on TCP load balancing and failover without disrupting existing connections during topology changes.

Key Features

  • Zero-downtime connection management — existing connections are preserved during cluster topology changes (unlike HAProxy)
  • Hot upstream updates — automatic discovery of cluster members via Patroni REST API (/cluster endpoint)
  • Role-based routing — route connections to leader, sync replicas, or async replicas
  • Least Connections load balancing — with connection counter preservation during updates
  • Replication lag awareness — configurable max_lag_in_bytes with automatic client disconnection
  • Member state filtering — only members with state: "running" are used as backends
  • Configuration hot-reload — via SIGHUP signal without restart

@vadv
vadv force-pushed the patroni_proxy branch 6 times, most recently from 0687587 to f830fa3 Compare January 10, 2026 18:03
@vadv
vadv force-pushed the patroni_proxy branch 12 times, most recently from 794fdd9 to 2fef2fc Compare January 10, 2026 21:01
@vadv
vadv force-pushed the patroni_proxy branch 3 times, most recently from 76ae168 to c8aec31 Compare January 10, 2026 22:30
@vadv
vadv force-pushed the patroni_proxy branch 15 times, most recently from 5fdf104 to 94d9601 Compare January 11, 2026 08:52
@vadv vadv changed the title add patroni_proxy Add patroni_proxy - high-performance TCP proxy for Patroni clusters Jan 11, 2026
@vadv
vadv merged commit c45d671 into master Jan 11, 2026
22 of 23 checks passed
@vadv
vadv deleted the patroni_proxy branch January 11, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant