tags:

views:

136

answers:

1

Given that MongoDB describes Replica-Pairs replication as

...databases automatically coordinate which is the master and which is the slave at a given point in time.

At startup, the databases will negotiate which is master and which is slave. Upon an outage of one database server, the other will automatically take over and become master from that point on.

how is this different from Master-Master replication?

+3  A: 

With replica pairs, only one database is master at a time, so only one database can be written to at a time. The second database will always be a slave, available for failover,

With master-master replication, which is discouraged with MongoDB, both nodes can be written to.

Kyle Banker
With replica pairs, is it possible to add more than one "slave?" Let's say I needed a handful of slaves for read purposes, is it better to run a master with the slaves and do the failover manually in the event the master goes down?
luckytaxi
It will be once replica sets are implemented (http://jira.mongodb.org/browse/SERVER-557). In the meantime, the solution you suggest works fine.
Kyle Banker