- Seven NoSQL Databases in a Week
- Aaron Ploetz Devram Kandhare Sudarshan Kadambi Xun (Brian) Wu
- 103字
- 2025-04-04 17:13:21
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.