
上QQ阅读APP看书,第一时间看更新
Sharded clusters
MongoDB's sharding consists of the following components:
- Shard: Each shard stores a subset of sharded data. Also, each shard can be deployed as a replica set.
- Mongos: Mongos provide an interface between a client application and sharded cluster to route the query.
- Config server: The configuration server stores the metadata and configuration settings for the cluster. The MongoDB data is sharded at the collection level and distributed across sharded clusters.
- Shard keys: To distribute documents in collections, MongoDB partitions the collection using the shard key. MongoDB shards data into chunks. These chunks are distributed across shards in sharded clusters.