I am looking at adopting a Mongo cluster and am doing research. We hope to have a cluster that can scale from 10k updates per second to 100k updates per second with very write heavy traffic.

The primary question is, If we wanted to move to a newer version, is this possible without downtime?

Would we upgrade one shard / replica at a time and let it rejoin the group and hope it is backwards compatible and doesn't munge the data?

As a bonus, what is a cluster estimate on 10k updates per second? 100k?

I looked at http://www.mongodb.org/display/DOCS/Sharding+FAQ but couldn't find an upgrade procedure.

  • 1
    I have done it the way you mention, and it has worked. (one at a time upgrades: shutdown node, replace binary, start node). I would like to hear it from a 10gen employee, though, that it should always work like that. – Eve Freeman Jan 13 '12 at 5:20

You have to check the release notes for each version, but the upgrade directions for 2.0 are here:


The last two bullet points specifically address your question:

  • To upgrade a replica set. Upgrade the secondaries first one at a time, then stepDown the primary and upgrade the primary. Using the stepDown command is better than simply shutting it down since the failover will happen quicker. To avoid losing the last few updates on failover you can temporarily halt your application (failover should take less than 10 seconds) or change your application code to confirm that each update reaches multiple servers. Note, after upgrading to 2.0 you can use the shutdown command to shutdown the primary without losing any safe updates.

  • To upgrade a sharded cluster. Upgrade config servers one at a time, in any order. Since config servers use two phase commit, shard configuration metadata updates will halt until all are up and running. mongos routers can be upgraded in any order.

Downtime is minimal, taking only the time for the Replica Set to acknowledge that the stepDown has occurred, and election/promotion to happen.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.