An advantage of range-based sharding is that you can create zones (https://docs.mongodb.com/manual/core/zone-sharding/#zones) within the sharded data. A zone is an arbitrary tag or label you can assign to a range of documents based on the shard key value. The zones can then be later associated with specific shards to allow for the geographic distribution of data. Ranges cannot overlap. Further, the field (or fields) representing the shard key must be indexed so that you are assured the range values are consecutive.Â
To work with zones within a sharded cluster, you need to do two things: define the zones and then assign ranges. Let's start with the zone definition.