Q40: What is Sharding in MongoDB and what are its core components?
Sharding is MongoDB's strategy for horizontal scaling, distributing datasets across multiple physical server clusters (shards):
- Shard: Replica set storing a subset of partitioned data.
- Mongos: Query router routing client operations to matching shards.
- Config Servers: Store cluster metadata and chunk mapping state.
Key Takeaways
- Enables horizontal scale-out for massive datasets.
- Components: Shards,
mongosrouters, Config Server replica sets.
Knowledge Check
Which component acts as the interface router for applications querying a MongoDB Sharded Cluster?