FAILOVER
=========
ps -Aef|grep mongod
Ps -Aef|grep mongod|grep <pid> ---- belongs to primary instance port id
kill -9 <pid>
rs.slaveOk() for making the secondary replica set to allow user queries...this has to be executed on secondary dbs only
After all the failover testings are done, bringing back the failed node to online:
mongod --replSet abc --dbpath 1 --port 27001 --oplogSize 50 --logpath log.1 --logappend --fork
Read Preference :
rs.slaveOk() for making the secondary replica set to allow user queries...this has to be executed on secondary dbs only
primary - Default
primary preferred - Try primary if not reachable then read from secondary
secondary - Read from scondary, offload read from primary
secondary preferred - Scondary first then primary
nearest - Nearest member first
No comments:
Post a Comment