You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
445 B
12 lines
445 B
# 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*.
|
|
|