Hello,
I am currently exploring optimal deployment strategies for a MongoDB Replica Set across two data centers. My goal is to ensure high availability and seamless failover, specifically achieving the following:
- In the event of a failure in the primary data center, the secondary data center should be able to elect a primary node and maintain read/write availability.
- Once the primary data center is restored, we want the primary node to migrate back to the primary data center.
My proposed deployment strategy is as follows:
- Deploy two nodes, including the primary node with the highest priority, in the primary data center.
- Deploy three secondary nodes in the secondary data center.
Would this configuration be effective in achieving our goals? Are there any potential issues or best practices we should be aware of?
Thank you in advance for your insights and recommendations.