I need to distribute mongo nodes over 2 data centers.
I am bit confused by the fault-tolerance table :
Number of Members = 4
Majority Required to Elect a New Primary = 3
Does the number 4 mean I need total 5 voting members or can I have 3 voting members + 1 priority 0 hidden member ?
For example :
- DC1 : P, H (priority=0)
- DC2 : S, S
If DC1 is down , will DC2 elect a primary ?
If DC2 is down , do I need to convert H to arbitrer or it will remain Primary ?
Essentially, it would be great if someone can provide few recommended configuration of replicaset for 2 DCs that ensures automatic primary selection (selection with minimum manual effort) upon DC failure.
Thanks in advance, Kaniska