Browse Source

howto replica

master
root Apostolos 5 years ago
parent
commit
22256118ea
  1. 12
      create-replica

12
create-replica

@ -0,0 +1,12 @@
# connect to PRIMARY
mongo
> rs.initiate()
> rs.status()
> rs.add("mongo_node2")
> rs.add("mongo_node3")
> rs.status()
> rs.isMaster()
#You now have a working MongoDB replication.
#You can increase the cluster size from *three* nodes to *five* nodes, *seven* nodes or more.
#This number is calculated from: [Master Eligible Nodes) / 2 + 1], which means an odd number of nodes is required for high availability, the minimum number is *three*.
Loading…
Cancel
Save