Sharding is an approach of distributing data across different machines. MongoDB 4.0 supports multi-document transactions on replica sets (WiredTigeronly) MongoDB 4.2 supports distributed transactions, which adds support for multi-document transactions on shardedclusters Change the value of the shard key is nothing more than a distributed transaction Sharding in MongoDB. The basic principle of this feature of MongoDB is to support the data growth which is expected any application. In this chapter, you will learn about this MongoDB feature name - sharding. Sharding is the architecture to store big data in distributed servers. As of MongoDB 3.6, shards must be deployed as a replica set to provide redundancy and high availability.. Users, clients, or applications should only directly connect to a shard to perform local administrative and maintenance operations. MongoDB Sharding is a method that was used to distribute the data across multiple machines, basically, sharding is used to deploy large data set with high throughput. Due to the increase in the size of the data, one machine might not be sufficient in order to store the necessary data or provide a good environment and throughput to read and write the data. I try to experiment with sharding and make a sample configuration: the simplest one for two shards. In other words, it can be said that the sharding concept is used for splitting large data sets into undersized data sets across several MongoDB instances. It is an approach to meet data growth demands. Sharding is the method of storing data records across several machines and it is the approach of MongoDB to meet the data growth requirements. A single server is not handling the large data set and high throughput, to increase the high throughput from the database system we have use sharding. In laymen terms, it means to break up large tabular data into smaller subsets. Directory based sharding is a good choice over range based sharding in cases where the shard key has a low cardinality and it doesn’t make sense for a shard to store a range of keys. A single machine can not be adequate to store the data or provide a reasonable read and write throughput as the size of the data increases. Now big applications are based on the end to end transactional data, which is growing day by day and the requirement of space is rapidly increasing. In MongoDB, sharding maintains a huge data and is mostly used for massively growing space requirement. MongoDB sharding is a method to manage large data sets efficiently by distributing the workload across many servers without having any adverse effects on the overall performance of the database. In MongoDB operations on a single document are atomic. MongoDB is a NoSQL database which stores data in the form of key-value pairs and has the ability to work in cross-platform model.Sharding is one of the concepts which is very important to MongoDB. A shard contains a subset of sharded data for a sharded cluster.Together, the cluster’s shards hold the entire data set for the cluster. Sharding is the mechanism of storing data across multiple machines. Sharding in MongoDB is the process in which the data is stored across various machines.