Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


mongodbURI = "mongodb://,,"

You don't need to specify all nodes in the cluster, however if the one you specify is down, you will not be able to get the other nodes in the cluster.

A replicated system should have a minimum of 3 nodes. If you have only two nodes in the cluster and one disappears, the second node will NOT be selected the new primary node, and your cluster will not be reachable One of these nodes can be an Aribiter (an arbiter is a regular mongo instance, but does not store any data). Once one of the nodes disappears the left over nodes will vote on who will become the next primary. Normally each node will have the same priority, but this can be changed during the setup.