June 2014
Intermediate to advanced
696 pages
38h 52m
English
The next step in sharding a large collection is to decide how to partition the documents based on the shard key. There are two methods you can use to distribute the documents into different shards, based on the shard key value. Which method you use depends on the type of shard key you select:
Range-based sharding: One method is to divide the data set into specific ranges, based on the value of the shard key. This method works well for shard keys that are numeric. For example, if you have a collection of products and each product has a specific product ID from 1 to 1,000,000, you could shard the products in ranges ...
Read now
Unlock full access