Upgrading a mongo cluster
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.
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.