开发者

How to run slave automatically when master is down in mongodb?

I have master and slave running on different port. But when I close master the slave goes down too. I understand why this is happening. I want that when 开发者_C百科master goes down the slave become a new master without restarting the mongod with --master option. And My mongodb connection never got down.


You need use the replicaSet system instead of the Master/Slave system in MongoDB.

all documentation about Replicat Set is on MongoDB wiki : http://www.mongodb.org/display/DOCS/Replica+Sets

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜