As we discussed in Chapter 1, Architectural Considerations, it is incredibly important to include an odd number of nodes in most cluster designs. Generally, this is necessary to guarantee that a voting quorum can be established in the case that the primary node becomes unavailable. We must choose one existing standby system to promote and take over the cluster.
We must also consider the possibility of split-brain and network partitions. Witness nodes help protect us from these scenarios by acting as an objective third party. If they are located in the same data center as the current primary, then the network partitions will prevent it from voting at all, and we will be protected from network partitions. If it's in a tertiary data center away from either the current primary or standby, there will be two independent routes to verify whether or...