We are using Mongo DB for our Application .
Currently when i issue the db.isMaster() command in our Mongo Shell .
It displayed this below information ( This set up is currently associated with our development box )
PRIMARY> db.isMaster()
{
"setName" : "dev",
"ismaster" : true,
"secondary" : false,
"hosts" : [
"10.11.13.111:27017",
"10.11.13.111:27018"
],
"arbiters" : [
"10.11.13.111:27019"
],
"primary" : "10.11.13.111:27017",
"me" : "10.11.13.111:27017",
"maxBsonObjectSize" : 16777216,
"ok" : 1
}
Please let me know what does the above information means ??
1 . Does it mean that it has got 1 primary and two secondary slaves ?? (One arbitrary also present in list )
- How can i know if slaveOk is set to true or false ??
Thnaks in advance .
setNameis the name of your replica set.ismasterobviously indicates whether the node you are connected to master or slave.secondaryis contrary toismaster.hostsarehost:portpairs of nodes storing data in replica set.arbitersarehost:portpairs of arbiters. These nodes can not store data, but their votes are used in master election process.primaryindicates who is primary.me– indicates the node you are connected to.maxBsonObjectSize– 16MB for now. Just a very global constant.ok– kinda of a return code.All can be found here. And regarding your questions:
10.11.13.111:27017) and one slave (10.11.13.111:27018)