Replication

MongoDB supports asynchronous replication of data between servers for failover and redundancy. Only one server (in the set/shard) is active for writes (the primary, or master) at a given time – this is to allow strong consistent (atomic) operations. One can optionally send read operations to the secondaries when eventual consistency semantics are acceptable.

Two forms of replication are available, Replica Sets and Master-Slave. Use Replica Sets – replica sets are a functional superset of master/slave and are handled by much newer, more robust code.

Each shard of a Mongo cluster is a replica set.

Verifying propagation of writes with getlasterror

A client can block until a write operation has been replicated to N servers -- read more here .

See Also

Video


A MongoDB Replication Primer: Replica Sets in Practice - Presentation at MongoSV (Dec 2011)


Labels

printreplicationinfo printreplicationinfo Delete
printslavereplicationinfo printslavereplicationinfo Delete
getreplicationinfo getreplicationinfo Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

PLEASE POST QUESTIONS IN THE USER GROUPS FORUM. Post non-question comments and helpful hints here.

blog comments powered by Disqus