I'm trying to setup a postgres replicated cluster for the first time, and I'm not sure of the hardware setup we need.
What we would like is to have synchronously replicated postgresql instances running in one data center which also asynchronously replicates to a remote data center (in case of a disaster in the main data center).
I'm wondering what is typical for the number of nodes per set of replicated nodes? If we only go with 2 per each data center, then if one node fails we are no longer replicating, so it seems like 3 is the minimum.
How about 4 nodes per data center? That way when we want to upgrade, we can take 2 nodes offline to perform an upgrade, while leaving the other 2 nodes replicating, and then switch them off.
Is 4 overkill? What is the best practice?
Thanks!
Lee Nguyen