user426795
user426795

Reputation: 11663

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 master goes down the slave become a new master without restarting the mongod with --master option. And My mongodb connection never got down.

Upvotes: 2

Views: 342

Answers (1)

shingara
shingara

Reputation: 46914

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

Upvotes: 3

Related Questions