MongoDB Sharding and Horizontal Scaling Flashcards
6 cards from real MongoDB practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.
Read the first 6 MongoDB Sharding and Horizontal Scaling flashcards as text
What is a chunk in MongoDB sharding?
Answer: A contiguous range of shard key values that is stored on a single shard
A chunk is a contiguous range of shard key values assigned to a specific shard. As data grows, MongoDB splits large chunks and the balancer migrates chunks between shards. The default chunk size is 128 MB in recent MongoDB versions.
What is zone sharding (also called tag-aware sharding) in MongoDB?
Answer: Associating ranges of shard key values with specific shards to control data placement
Zone sharding allows you to define ranges of shard key values (zones) and associate them with specific shards. This is used for data sovereignty (keeping data in a specific region), tiered storage, or workload isolation — ensuring certain documents always reside on designated shards.
What is the minimum number of config servers required for a production MongoDB sharded cluster?
Answer: 3
Production MongoDB sharded clusters require 3 config servers deployed as a replica set (CSRS — Config Server Replica Set). Three config servers ensure high availability of cluster metadata. Using a single config server is only suitable for testing.
What happens when you shard a collection in MongoDB that already has data?
Answer: MongoDB creates an initial chunk and begins distributing data during subsequent balancer runs
When you enable sharding on an existing collection, MongoDB creates an initial chunk containing all existing documents on the primary shard. The balancer then gradually migrates chunks to other shards over time. Initial sync doesn't happen instantaneously.
What is a jumbo chunk in MongoDB sharding and why is it a problem?
Answer: A chunk that cannot be split because all documents share the same shard key value, preventing rebalancing
A jumbo chunk forms when all documents within a chunk share the same shard key value, preventing further splitting. The balancer cannot move jumbo chunks, causing imbalanced data distribution. Choosing a high-cardinality shard key prevents jumbo chunk formation.
Which command enables sharding for a specific database in MongoDB?
Answer: sh.enableSharding('dbName')
sh.enableSharding('dbName') enables sharding at the database level, which is required before sharding individual collections. This is run via the mongos router. Then sh.shardCollection('dbName.collectionName', { shardKey: 1 }) shards a specific collection.
How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. Exam facts are checked against the official sources listed below. Not reviewed by a subject-matter expert. Editorial policy
Sources & references
Exam facts on this page (fees, format, dates, passing scores) are checked against these official sources; the date is our last check. Editorial policy
- 10geneducation.zendesk.com — Test dates, score release, passing score, test delivery, retake policy · verified Oct 2026
- learn.mongodb.com — Eligibility, fees, exam format, time limit · verified Oct 2026