During a regional outage, your cluster might not have a primary node if the regional outage affects a majority of the cluster's electable nodes. You can use the Atlas UI to restore your Atlas multi-region cluster by reconfiguring your cluster.
If you reconfigure your cluster during an outage, your cluster might lose data in the following circumstances:
If your MongoDB process didn't replicate write operations to the node that becomes primary after the reconfiguration in any cluster. Your replica set rolls back these writes when the unavailable members become available again. To learn more, see Rollbacks During Replica Set Failover.
In sharded clusters, if your MongoDB process didn't replicate chunk migrations. The data inconsistency might cause orphaned chunks.
Note
If you force a reconfiguration for a sharded cluster, Atlas adds two new nodes to the config server replica set in a region unaffected by the outage. When you apply subsequent cluster changes after the sharded cluster becomes healthy, Atlas removes the additional nodes.
A regional outage or regional outage simulation that affects the highest priority regions in a sharded cluster could cause the cluster to become inoperable for read operations. To restore the config servers, do the following:
Configure a read preference that is suitable for querying secondary nodes for reads.
Reconfigure the cluster for regaining electable nodes.
Prerequisites
Your cluster must be experiencing a total outage of nodes in one or more regions with at least one electable node remaining in another region. To learn how to simulate a regional outage for your multi-region cluster, see Simulate Regional Outage.
For assistance with other causes of node outages, contact support.
Procedure
To restore your Atlas multi-region cluster from an outage, you must manually reconfigure your replica set:
In Atlas, go to the Clusters page for your project.
If it's not already displayed, select the organization that contains your desired project from the Organizations menu in the navigation bar.
If it's not already displayed, select your desired project from the Projects menu in the navigation bar.
In the sidebar, click Clusters under the Database heading.
The Clusters page displays.
Click Cloud Provider & Region.
Under Electable nodes for high availability, you can add new nodes to:
An existing region by editing the number of nodes in the Nodes column
A new region by clicking + Add a provider/region
Tip
We strongly advise against adding nodes to regions that are affected by the outage.
Click Review Changes.
Review your changes to the cluster configuration and pricing.
If you're adding an electable node to a new AWS region that is not affected by the outage, you can toggle Enable Faster Cross-Region Atlas Initial Syncs for AWS Clusters to ON to speed up the cross-region data copy between AWS nodes for an additional cost. This option only appears if you're adding a node to an AWS region without the primary node, and if you have not previously enabled this option in the cluster settings. To learn more about this option, see Enable Faster Cross-Region Initial Sync for AWS Clusters.