MongoDB 3.0 was recently released. Instead of focusing on what’s new – that is so easy to find, let’s rather talk about something that has not changed a lot since the early MongoDB days. This topic is sharding and most specifically: how to choose a good sharding key. Note that most of the discussion will also apply to MySQL, so if you are more interested in sharding than in MongoDB, it could still be worth reading.
When do you want to shard?
In general sharding is recommended with MongoDB as soon as any of these conditions is met:
- #1: A single server can no longer handle the write workload. …