Supporting hashed fields in compound indexes and shard keys
We have been using hashed keys to shard in regular clusters, they are useful for pre-sharding and keeping a balanced cluster without having to rely on the balancer.
Global clusters and zone sharded clusters, we must use a compound shard key to identify both the zone and the shard key.
MongoDB does not currently support compound shard keys containing hashed fields, making it cumbersome for us to use zone sharding.
MongoDB could be improved by supporting hashed fields in compound keys.
Good news – this feature is planned to be included in the upcoming 4.4 release. Stay tuned!