PostgreSQL has a mature, production-grade high availability stack that costs nothing in licensing and is straightforward to operate once it is set up.
This lab builds a six-node HA cluster using four open-source components: Patroni for cluster management and automatic failover, etcd as the distributed consensus store, HAProxy for load balancing and connection routing, and keepalived for a floating virtual IP that survives HAProxy node failures.
The result is a cluster where a primary failure is detected and a new primary is elected in under 30 seconds, with no manual intervention required.
Continue reading “PostgreSQL High Availability with Patroni, etcd, HAProxy and keepalived”