Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
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. –  Wes Freeman Jan 13 '12 at 5:20

1 Answer 1

up vote 3 down vote accepted

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

http://www.mongodb.org/display/DOCS/2.0+Release+Notes#2.0ReleaseNotes-Upgrading

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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