Three-member replica set across Data center

Hi @Allwyn_Jesu,

There has been a number of topics already in this forum about arbiters. I’ll just mention this one below but please have a read through a few of them.

Arbiters are not recommended in a production environment, it’s as simple as that. If you can, avoid them.

A MongoDB Replica Set (RS) can only elect a primary if the majority of the voting members in the RS can be reached. In your setup with 2 nodes in DC1 and 1 node in DC2, if DC1 goes down / offline, you are left with a single node that cannot reach the majority (2) so it cannot become primary. This is to prevent the possibility of having 2 primaries as the isolated DC1 is in a position to elect a primary potentially (== split brain).

The only way to get something “perfect” is to have 3 DCs, each with one node. As it’s complicated / costly to have, in MongoDB Atlas, we use the “availability zones” of AWS and make sure each node is in a different availability zone.

I also explained here a few hours ago why one arbiter is already a bad idea - even in a 5 nodes RS: readConcern with more than 1 secondary and an arbiter - #2 by MaBeuLux88.

I hope this helps :sweat_smile:.

Cheers,
Maxime.

2 Likes