CHAPTER 10 Sharding Sharding is the process of storing data records across multiple machines and is MongoDB’s approach to meeting the demands of data growth. As the size of the data increases, a single machine may not be sufficient to store the data nor provide an acceptable read and write throughput. Sharding solves the problem with horizontal scaling. With sharding, you add more machines to support data growth and the demands of read and write operations. Sharding is a method for storing data across multiple machines. MongoDB uses sharding to support deployments with very large data sets and high throughput operations. Database systems with large data sets and high throughput applications can challenge the capacity of a single server. High query rates can exhaust the CPU capacity of the server. Larger data sets exceed the storage capacity of a single machine. Finally, working set sizes larger than the system’s RAM stress the I/O capacity of disk drives. To address these issues of scales, database systems have two basic approaches: vertical scaling and sharding . 10.1 Sharding Introduction 10.1.1 Purpose of Sharding 661 Sharding Reference (page 736) Reference for sharding-related functions and operations. Sharded Cluster Tutorials (page 690) Tutorials that describe common procedures and administrative operations rel- evant to the use and maintenance of sharded clusters. Sharding Mechanics (page 684) Discusses the internal operation and behavior of sharded clusters, including chunk migration, balancing, and the cluster metadata. Sharded Cluster Behavior (page 674) Discusses the operations of sharded clusters with regards to the auto- matic balancing of data in a cluster and other related availability and security considerations. Sharded Cluster Architectures (page 671) Outlines the requirements for sharded clusters, and provides exam- ples of several possible architectures for sharded clusters. Sharded Cluster Components (page 668) A sharded cluster consists of shards, config servers, and mongos instances. Sharding Concepts (page 667) The core documentation of sharded cluster features, configuration, architecture and behavior. Sharding Introduction (page 661) A high-level introduction to horizontal scaling, data partitioning, and sharded clusters in MongoDB.