MongoDB – Updating Sharded Cluster Without Downtime

mongodbshardingupgrade

I am trying to update my mongo sharded version from 2.4 to 2.6.3.

I have some queries on steps to update this.

  1. When I will run one mongos with the --upgrade option, will it update all the config and mongos or do I have to manually replace binaries on each one of them and restart the mongos and config?
  2. How can I update my config servers without downtime?
  3. Upgrading shard needs to down its members one by one and update the binary. Is there any other way to do it?

Best Answer

All details are here: http://docs.mongodb.org/manual/release-notes/2.6-upgrade/

Answer 1: All metadata will get updated. I suggest to execute the mongos --upgrade using an extra mongos

Answer 2: You don't have any downtime from the config servers since mongos have the require cached information and balancer is disable

Answer 3: There is no other way. You upgrade the secondaries and then promote one of them to PRIMARY and upgrade the old-PRIMARY. Downtime is minimal (1-2 second my case) if replica set are well-sync