我master and slave
在不同的端口上运行。但当我close master
太slave goes down
。我明白为什么会这样。我希望当主人宕机时,奴隶成为一个新的主人without restarting the mongod with --master
选项。和我的mongodb connection never got down
。
1 回答
3
您需要使用副本集系统而不是 MongoDB 中的主/从系统。
所有关于 Replicat Set 的文档都在 MongoDB wiki 上:http ://www.mongodb.org/display/DOCS/Replica+Sets
于 2011-01-03T11:01:55.657 回答