0
0
MongoDBquery~5 mins

Range-based sharding in MongoDB - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is range-based sharding in MongoDB?
Range-based sharding splits data into chunks based on a range of shard key values. Each shard holds documents within a specific range, like dividing a book by chapters.
Click to reveal answer
beginner
How does MongoDB decide which shard stores a document in range-based sharding?
MongoDB looks at the shard key value of the document and places it in the shard responsible for the range that includes that value.
Click to reveal answer
intermediate
What is a chunk in range-based sharding?
A chunk is a continuous range of shard key values. MongoDB moves chunks between shards to balance data and load.
Click to reveal answer
intermediate
Why might range-based sharding cause hotspots?
If many writes target a small range of shard key values, one shard gets overloaded, causing a hotspot and slowing performance.
Click to reveal answer
beginner
Name one advantage of range-based sharding.
It allows efficient range queries because related data is stored together on the same shard.
Click to reveal answer
In range-based sharding, how is data divided across shards?
ABy ranges of shard key values
BRandomly across shards
CBy hashing the shard key
DBy document size
What is a potential problem with range-based sharding?
AData is evenly distributed
BChunks cannot move between shards
CHotspots can form if many writes target one range
DIt does not support range queries
What is a chunk in MongoDB range-based sharding?
AA backup copy
BA single document
CA shard server
DA range of shard key values
Which query type benefits most from range-based sharding?
ARandom document lookups
BRange queries on shard key
CFull collection scans
DQueries without shard key
How does MongoDB balance data in range-based sharding?
ABy moving chunks between shards
BBy deleting old data
CBy copying data to all shards
DBy changing shard keys
Explain how range-based sharding works in MongoDB and why it might cause hotspots.
Think about how dividing data by ranges affects where data goes and how busy shards get.
You got /4 concepts.
    Describe one advantage and one disadvantage of using range-based sharding.
    Consider query speed and load distribution.
    You got /2 concepts.