I've already setup MongoDB sharding and now I need to setup replication for availability. How do I do this? I've currently got this:
- 2 mongos instances running in different datacenters
- 2 mongod config servers running in different datacenters
- 2 mongod shard servers running in different datacenters
- all communication is over a private network setup by my provider that is available cross-datacenter
Do I just setup replication on each server (by assigning each a secondary)?
I would build the whole system in 3 DCs', for redundancy. Every data center would have three servers with services of:
So, a total of 9 nodes (physical or virtual).
If we "lose" one DC, everything works still, because we have a majority in all three replica sets.