The reason Patroni works as a series of software layers is to reduce the reliance on any single point of failure. There's always a consensus management element and a pooling resource. Each portion of the stack is designed to operate on all candidate servers. Due to this, we no longer need to rely upon a virtual IP address or Canonical Name Record (CNAME) that must be reassigned to a promoted replica.
In the end, Patroni should deliver a cluster with the following capabilities:
- It can automatically elect a replacement in the case of failover.
- It can redirect write-capable connections to a newly elected primary node.
- Newly provisioned nodes can add themselves to the cluster.
- Recovered primary nodes can rejoin the cluster as replicas.
Luckily, our new stack is capable of satisfying all of those requirements.
...