Highly Available, Load-Balanced PostgreSQL with Patroni, HAProxy, and Keepalived
Patroni runs your PostgreSQL cluster and handles failover, promoting a replica the moment the primary dies and recording the change in its distributed store (etcd, Consul, or ZooKeeper). That part works on its own. Your applications still need one stable address to connect to, and they need writes to reach the primary while reads spread across replicas. HAProxy handles that…







