How to Add Standby Nodes to MongoDB Database Clusters

MongoDB is a source-available cross-platform document-oriented database program for high-volume storage. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas.

In a database cluster, standby nodes maintain a copy of the primary node. If the primary node fails, a standby node is automatically promoted to replace it.

MongoDB clusters can only have two standby nodes at this time. This is necessary for a high availability cluster configuration. For more information about MongoDB’s high availability cluster architecture, see MongoDB’s official documentation.

You can add standby nodes during cluster creation in the cluster configuration section of the create page.

You can also add standby nodes to an existing database cluster. From the Databases page, click the name of the cluster to go to its Overview page, then click the Settings tab.

Screenshot of cluster settings page

On the Settings page, in the Cluster configuration section, click Edit. Open the Standby Nodes dropdown and choose the number of standby nodes.

Screenshot of Add Standby Nodes

When you’re done, click Save to immediately provision the standby nodes. The time to complete varies depending on the size of the primary node and its data, but we recommend allowing at least 5 minutes.