Quantcast
Channel: StackExchange Replication Questions
Viewing all articles
Browse latest Browse all 17268

How can MongoDB elect a new primary when a datacenter has failed?

$
0
0

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?


Viewing all articles
Browse latest Browse all 17268

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>