Skip to main content
InterviewHubPRO
Section Overview
Q41

Question 41 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

82%
MongoDB & NoSQL (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

MongoDB Sharding Architecture: `mongos`, Config Servers, and Chunks.

senior LevelSystem DesignDatabases & SQL

In Simple Words: Sharding distributes data horizontally across a cluster of Replica Sets:

  1. mongos (Query Router): Lightweight stateless proxy that routes client requests to the correct shard.
  2. Config Database: Replicated cluster storing cluster metadata and shard key routing ranges.
  3. Chunks: Data ranges of a collection (default 64MB). When chunks grow too large, the balancer automatically splits and migrates them across shards.