- Sharding >
- Sharding Concepts
Sharding Concepts¶
These documents present the details of sharding in MongoDB. These include the components, the architectures, and the behaviors of MongoDB sharded clusters. For an overview of sharding and sharded clusters, see Sharding Introduction.
- Sharded Cluster Components
A sharded cluster consists of shards, config servers, and
mongos
instances.- Shards
- A shard is a
mongod
instance that holds a part of the sharded collection’s data. - Config Servers
- Config servers hold the metadata about the cluster, such as the shard location of the data.
- Sharded Cluster Architectures
Outlines the requirements for sharded clusters, and provides examples of several possible architectures for sharded clusters.
- Sharded Cluster Requirements
- Discusses the requirements for sharded clusters in MongoDB.
- Production Cluster Architecture
- Sharded cluster for production has component requirements to provide redundancy and high availability.
- Sharded Cluster Behavior
Discusses the operations of sharded clusters with regards to the automatic balancing of data in a cluster and other related availability and security considerations.
- Shard Keys
- MongoDB uses the shard key to divide a collection’s data across the cluster’s shards.
- Sharded Cluster High Availability
- Sharded clusters provide ways to address some availability concerns.
- Sharded Cluster Query Routing
- The cluster’s routers, or
mongos
instances, send reads and writes to the relevant shard or shards.
- Sharding Mechanics
Discusses the internal operation and behavior of sharded clusters, including chunk migration, balancing, and the cluster metadata.
- Sharded Collection Balancing
- Balancing distributes a sharded collection’s data cluster to all of the shards.
- Sharded Cluster Metadata
- The cluster maintains internal metadata that reflects the location of data within the cluster.