7 June 2013
Should I shard? One way is to create a three by three system with the idea of
standing up another set as you grow.
mongos is "almost" just an extension of the drivers.
Sharding is transparent to the application, but if you're doing updates, you
issue an update, what rows, etc., but default it will...
mongos will get update and one by one ask the shards until it finds
one that matches the criteria. You'll get failure if you issue an update
without a specific shard key or include MULTI=TRUE.
Different errors come back from mongos than from mongod.
If you've got retry logic that's error-specific, you could be unpleasantly
Version upgrades when sharding
Replace the binary and restart the process (mongos). For all sharding
- Disable the balancer and wait for any in-progress chunk migrations to
finish before beginning the actual upgrade.
- Do a "rolling upgrade", secondaries and arbiters first.
- Ensure secondary has caught up before upgrading it.
- Step down the original primary, allow election to occur.
- Upgrade the original primary.