I am curious about the following situation when setting up a MongoDB cluster.
2 Datacenters, 2 nodes in each data center for a total of a 4 node replicaset. One of the two datacenters has become unavailable for any reason, thus blacking out the primary and one of the secondaries.
Per fault tolerance section of https://docs.mongodb.com/manual/core/replica-set-architectures/: I need at minimum 3 votes to elect a new primary, but will only have 2 surviving voters.
I am unable to extend into a 3rd datacenter.
How can I setup the cluster to be able to withstand a datacenter failure and continue to write in the surviving datacenter?