diff --git a/create-replica b/create-replica new file mode 100644 index 0000000..daea878 --- /dev/null +++ b/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*.