One of the much awaited features in MongoDB 1.6 is replica sets, MongoDB replication solution providing automatic failover and recovery
Chris Heald has a very detailed guide on setting up MongoDB replica sets:
We’re now up and running with a replica set. We can add new slaves to the replica set, force a new master, take nodes in the cluster down, and all that jazz without impacting your app. You can even set up replica slaves in other data centers for zero-effort offsite backup. If your DB server exploded, you could point your app at the external datacenter’s node and keep running while you replace your local database server. Once your new server is up, just bring it online and re-add its node back into your replica set. Data will be transparently synched back to your local node. Once the sync is complete, you can re-elect your local node as the master, and all is well again.
Update: Kristina Chodorow (10gen) has a 3 part series about MongoDB replica sets: ☞ part 1 (setup), ☞ part 2 (replica sets behind the scene) and ☞ part 3 (migrating live setups to use replica sets).
Quick Guide to MongoDB Replica Sets originally posted on the NoSQL blog: myNoSQL