Behind the Scenes of a Highly Available Infrastructure
summary
A production PostgreSQL architecture using Patroni with Consul or Zookeeper for automatic leader election, plus per-node HAProxy, VIPs and keepalived to route read/write and read-only pools. A dedicated backup replica uses ZFS snapshots sent offsite and to developer VMs for tested restores; logical decoding feeds Kafka for analytics; cluster upgrades are scripted (9.6 → 10/12). Results include fewer alerts and much faster recovery, with remaining migration risks such as charsets, sequences and logical-replication quirks.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 1:06High availability needs
- 3:59Database cluster topology
- 5:03Automated failover with Patroni
- 8:39Traffic redirection with HAProxy
- 10:48Service discovery with Consul
- 13:55Load balancing and VIP management
- 17:27Transparent proxy protocol
- 19:35Backup and restore strategies
- 22:51Business intelligence infrastructure
- 25:40Database update challenges
- 27:06Manual update process
- 30:23Automated migration methods
- 34:43Lessons learned
- 36:08Automation and service offering
- 37:34Future plans and PostgreSQL 12
