I recently setup a patroni cluster following the documentation, however I’m unsure on whether my setup runs as expected when I tested stopping ETCD.
When ETCD stopped on the leader, the ETCD cluster on the other nodes indicated a new leader, however patroni remained leader on the original node.
Is this expected behaviour?
There’s a quorum requirement for ETCD (n/2)+1: for example if you have 3 etcd nodes you can only afford to lose 1 node. Once you’ve lost ETCD quorum the patroni management of the cluster no longer works even though the postgres nodes are still active any change of status in the cluster will not effect any changes.
Hope this helps
Not quite the issue I’m having. What I see (3 nodes) is if I restart ETCD the patroni cluster doesn’t not failover, but the ETCD one has.
if I restart ETCD the patroni cluster doesn’t not failover, but the ETCD one has
Don’t worry, this is normal behaviour and doesn’t affect the cluster’s integrity.
Thanks Robert, so it is ok to have the leader of the ETCD cluster, and the Patroni Primary as different nodes.
Should an effort be made to make them have the same node, one I have all 3 nodes running etcd again?
Thanks for the responses.
Should an effort be made to make them have the same node?
Nope, don’t worry about it.
Great thanks Robert.
My interpretation was that Patroni follows who ETCD believes the leader to be, rather than ETCD being a separate entity just needed for config store.