Consider these basic guidelines while thinking about how many data centers are necessary, and which nodes should be placed in each:
- If data must be available in case of a site outage, use one additional location.
- Always place the backup in a separate location if possible.
- If two locations are in the same general geographical area, use one additional location at least 100 miles (160 km) away.
- If automated failover is desirable, consider at least three data centers.
- Place one PostgreSQL server (or witness) in each location.
- Continue placing PostgreSQL servers evenly until the count is exhausted.
- Try to place witness servers in a location that is unlikely to lose contact with more than one location simultaneously.