How to Configure Data Route on Sharded Cluster via Shard Key

There is no info about how to configure shard key distribution on sharded cluster.
We can say that 1<=x<3 , 3<=x<5 , 5<=x<7 x will insert into shard cluster. How can we route the data?

Hi @Beytullah_48478

This is an introductory course. If you want to learn more about distribution and the balancer, refer to the documentation.

NB: Distribution of chunks happens internally and is managed by the mongos. There’s no manual intervention or additional configuration required.

Hi @Beytullah_48478,

I would recommend you to read our documentation on Data Partitioning with Chunks.

Once you have understood the concepts then please refer these two pieces of documentation to know more about how to manually split the chunks.



That being said, you should leave chunk splitting to the automated processes within MongoDB otherwise you may end up having uneven distribution of chunks for a collection across the shards.

Hope it helps!

If you have any other query then please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer