MongoDB Replica set 集群搭建

来源:互联网 发布:apk制作软件安卓版 编辑:程序博客网 时间:2024/05/22 03:23

:搭建教程传送门
纯粹是记录下自己的第一次搭建,结果如下
{
“set” : “linzhipeng”,
“date” : ISODate(“2017-05-26T02:57:18.759+0000”),
“myState” : NumberInt(1),
“term” : NumberLong(4),
“heartbeatIntervalMillis” : NumberLong(2000),
“optimes” : {
“lastCommittedOpTime” : {
“ts” : Timestamp(1495767438, 1),
“t” : NumberLong(4)
},
“appliedOpTime” : {
“ts” : Timestamp(1495767438, 1),
“t” : NumberLong(4)
},
“durableOpTime” : {
“ts” : Timestamp(1495767438, 1),
“t” : NumberLong(4)
}
},
“members” : [
{
“_id” : NumberInt(0),
“name” : “xxx:10001”,
“health” : NumberInt(1),
“state” : NumberInt(1),
“stateStr” : “PRIMARY”,
“uptime” : NumberInt(1333),
“optime” : {
“ts” : Timestamp(1495767438, 1),
“t” : NumberLong(4)
},
“optimeDate” : ISODate(“2017-05-26T02:57:18.000+0000”),
“electionTime” : Timestamp(1495766116, 1),
“electionDate” : ISODate(“2017-05-26T02:35:16.000+0000”),
“configVersion” : NumberInt(1),
“self” : true
},
{
“_id” : NumberInt(1),
“name” : “xxx:10002”,
“health” : NumberInt(1),
“state” : NumberInt(2),
“stateStr” : “SECONDARY”,
“uptime” : NumberInt(1312),
“optime” : {
“ts” : Timestamp(1495767428, 1),
“t” : NumberLong(4)
},
“optimeDurable” : {
“ts” : Timestamp(1495767428, 1),
“t” : NumberLong(4)
},
“optimeDate” : ISODate(“2017-05-26T02:57:08.000+0000”),
“optimeDurableDate” : ISODate(“2017-05-26T02:57:08.000+0000”),
“lastHeartbeat” : ISODate(“2017-05-26T02:57:17.809+0000”),
“lastHeartbeatRecv” : ISODate(“2017-05-26T02:57:17.730+0000”),
“pingMs” : NumberLong(0),
“syncingTo” : “192.168.80.129:10001”,
“configVersion” : NumberInt(1)
},
{
“_id” : NumberInt(2),
“name” : “xxx:10000”,
“health” : NumberInt(1),
“state” : NumberInt(7),
“stateStr” : “ARBITER”,
“uptime” : NumberInt(62),
“lastHeartbeat” : ISODate(“2017-05-26T02:57:17.859+0000”),
“lastHeartbeatRecv” : ISODate(“2017-05-26T02:57:14.113+0000”),
“pingMs” : NumberLong(0),
“configVersion” : NumberInt(1)
}
],
“ok” : NumberInt(1)
}