MongoDB Documentation, Release 3.0.4 Considerations When Deploying a Replica Set Procedure Finally ensure that each member of a replica set is accessible by way of resolvable DNS or hostnames. You should either configure your DNS names appropriately or set up your systems’ /etc/hosts file to reflect this configuration. Configuration Specify the run time configuration on each system in a configuration file stored in /etc/mongod.conf or a related location. Create the directory where MongoDB stores data files before deploying MongoDB. For more information about the run time options used above and other configuration options, see http://docs.mongodb.org/manual/reference/configuration-options . The following procedure outlines the steps to deploy a replica set when access control is disabled. Step 1: Start each member of the replica set with the appropriate options. For each member, start a mongod and specify the replica set name through the replSet option. Specify any other parameters specific to your deployment. For replication-specific parameters, see cli-mongod-replica-set . If your application connects to more than one replica set, each set should have a distinct name. Some drivers group replica set connections by replica set name. The following example specifies the replica set name through the --replSet command-line option: mongod --replSet "rs0" You can also specify the replica set name in the configuration file . To start mongod with a configu- ration file, specify the file with the --config option: mongod --config $HOME/.mongodb/config In production deployments, you can configure a control script to manage this process. Control scripts are beyond the scope of this document. Architecture In a production, deploy each member of the replica set to its own machine and if possible bind to the standard MongoDB port of 27017 . Use the bind_ip option to ensure that MongoDB listens for connections from applications on configured addresses. For a geographically distributed replica sets, ensure that the majority of the set’s mongod instances reside in the primary site. See Replica Set Deployment Architectures (page 572) for more information. Connectivity Ensure that network traffic can pass between all members of the set and all clients in the network securely and efficiently. Consider the following: Chapter 9. Replication 604 • Establish a virtual private network. Ensure that your network topology routes all traffic between members within a single site over the local area network. • Configure access control to prevent connections from unknown clients to the replica set. • Configure networking and firewall rules so that incoming and outgoing packets are permitted only on the default MongoDB port and only from within your deployment.