MongoDB replica set requires at least three nodes. Three member replica set is capable of surviving a single node failure without impacting database operations, however, if another node fails, the entire replica set is switched to read-only mode. If master node fails, MongoDB automatically forces an election which requires a majority of nodes to be available. In such situations where a production site with two nodes fails, either a third data center or cloud-based MongoDB instance is recommended. In case if the third data center or cloud MongoDB node is not available, the entire replica set needs to be recovered on the surviving site. Typical three node replica set deployed across two sites is depicted in Figure 1.
Figure 1.
MongoDB replica set can also be deployed on FlashArray. Additionally, with ActiveDR, a disaster recovery environment may be easily configured without the need for MongoDB nodes located in a third data center or in the cloud. Utilizing FlashArray ActiveDR, the potential data loss and the recovery time are reduced and single-command storage failover process enables quick operational recovery. In case of the production site failure, data on the disaster recovery site is nearly instantaneously available via promoting the replica pod on the target FlashArray. With MongoDB hosts configured and connected to the volumes on the disaster recovery site, the disaster recovery database instance can be quickly started using replica volumes and immediately become available for production workloads.