Skip to main content
InterviewHubPRO
Section Overview
Q50

Question 50 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

100%
PostgreSQL Enterprise (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

High-Availability (HA) Architecture with Patroni and etcd.

senior LevelSystem Design

In Simple Words: Enterprise PostgreSQL HA uses Patroni:

  1. etcd / Consul: Distributed consensus store maintaining cluster state and leader lock.
  2. Patroni Daemon: Runs alongside each Postgres node, monitoring health and orchestrating automated failover.
  3. If Primary crashes, Patroni automatically selects the replica with the highest LSN (least data loss), promotes it to Primary within 10 seconds, and reconfigures remaining nodes to follow the new leader.