PGQL patroni cluster

Hello,

I have 2 DC, In which we have 2 PGSQL server with 3 etcd Node in each DC.

Is it recommended to have 3 etcd for each DC? What are pros and cons ?

How Replication will happen with above scenario ?

Looking for expert advice.

Thanks in advance.

@Sdash

Is it recommended to have 3 etcd for each DC? What are pros and cons ?

It looks like you are talking about Patroni Async HA mode - HA multi datacenter — Patroni 4.0.6 documentation

Well, to maintain a quorum and votes, a majority of DCS members should be available, so to tolerate a single failure, there should be at least 3 Member etcd clusters in each Zone.

In a worst-case scenario, if the DC is completely down, you should have the same number of nodes over the DR, and all you need to invoke a manual failover. As the DR doesn’t get the state of the DC so automatic failover wouldn’t be possible.

That doesn’t mean the setup will not work with fewer etcd nodes. Even a single etcd node is sufficient to communicate the state of the cluster and facilitate failover, etc. However, if that Node is down, it can impact the cluster and failover decisions.

How Replication will happen with above scenario ?

The Stand-By cluster on the DR side will replicate from the main DC leader, and the rest of the DR nodes will locally sync from the Stand-By leader. The replication can be set as async/sync - HA multi datacenter — Patroni 4.0.6 documentation

1 Like

Dear Anil,

Thanks for the clarification. Useful information.

But what I feel is having 3 or 5 etcd node cluster across DC is a more simpler implementation than having 3 etcd node per DC.

Best Regards,

Hi,

But what I feel is having 3 or 5 etcd node cluster across DC is a more simpler implementation than having 3 etcd node per DC.

This is extremely dangerous, don’t do it!

If either of your datacentres go completely down ETCD will lose quorum and patroni will stop working.