渡人自渡 发表于 2018-10-25 09:46:33

MongoDB高可用部署

config:PRIMARY> rs.status();  
{
  
"set" : "config",
  
"date" : ISODate("2017-04-12T09:29:51.889Z"),
  
"myState" : 1,
  
"term" : NumberLong(1),
  
"configsvr" : true,
  
"heartbeatIntervalMillis" : NumberLong(2000),
  
"optimes" : {
  
"lastCommittedOpTime" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
},
  
"readConcernMajorityOpTime" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
},
  
"appliedOpTime" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
},
  
"durableOpTime" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
}
  
},
  
"members" : [
  
{
  
"_id" : 0,
  
"name" : "172.16.13.243:20243",
  
"health" : 1,
  
"state" : 1,
  
"stateStr" : "PRIMARY",
  
"uptime" : 621,
  
"optime" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
},
  
"optimeDate" : ISODate("2017-04-12T09:29:42Z"),
  
"infoMessage" : "could not find member to sync from",
  
"electionTime" : Timestamp(1491989360, 1),
  
"electionDate" : ISODate("2017-04-12T09:29:20Z"),
  
"configVersion" : 1,
  
"self" : true
  
},
  
{
  
"_id" : 1,
  
"name" : "172.16.13.244:20244",
  
"health" : 1,
  
"state" : 2,
  
"stateStr" : "SECONDARY",
  
"uptime" : 42,
  
"optime" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
},
  
"optimeDurable" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
},
  
"optimeDate" : ISODate("2017-04-12T09:29:42Z"),
  
"optimeDurableDate" : ISODate("2017-04-12T09:29:42Z"),
  
"lastHeartbeat" : ISODate("2017-04-12T09:29:50.238Z"),
  
"lastHeartbeatRecv" : ISODate("2017-04-12T09:29:51.467Z"),
  
"pingMs" : NumberLong(0),
  
"syncingTo" : "172.16.13.243:20243",
  
"configVersion" : 1
  
},
  
{
  
"_id" : 2,
  
"name" : "172.16.13.245:20245",
  
"health" : 1,
  
"state" : 2,
  
"stateStr" : "SECONDARY",
  
"uptime" : 42,
  
"optime" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
},
  
"optimeDurable" : {
  
"ts" : Timestamp(1491989382, 1),
  
"t" : NumberLong(1)
  
},
  
"optimeDate" : ISODate("2017-04-12T09:29:42Z"),
  
"optimeDurableDate" : ISODate("2017-04-12T09:29:42Z"),
  
"lastHeartbeat" : ISODate("2017-04-12T09:29:50.237Z"),
  
"lastHeartbeatRecv" : ISODate("2017-04-12T09:29:51.537Z"),
  
"pingMs" : NumberLong(0),
  
"syncingTo" : "172.16.13.243:20243",
  
"configVersion" : 1
  
}
  
],
  
"ok" : 1
  
}


页: [1]
查看完整版本: MongoDB高可用部署