Thank you for your response and the provided documentation link.
However, based on the recommendations in the official documentation, I noticed that the suggested replica set configurations across two data centers might encounter situations where write operations are not possible. My goal is to ensure read/write availability at all times, even if one data center fails.
Specifically, I want the secondary data center to be able to elect a primary node and maintain read/write availability in the event of a failure in the primary data center. Additionally, once the primary data center is restored, I want the primary node to migrate back to the primary data center.
My proposed configuration 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 effectively achieve my goals? Or are there any other recommended configurations to achieve this? I look forward to your further guidance.
Thank you!