Challenge - 5 Problems
MongoDB Sharding Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What is the primary role of chunks in MongoDB sharding?
In MongoDB sharding, data is split into smaller parts called chunks. What is the main purpose of these chunks?
Attempts:
2 left
💡 Hint
Think about how data is shared across multiple servers.
✗ Incorrect
Chunks split the data into smaller parts so MongoDB can spread them across different servers (shards). This helps balance the load and store large datasets efficiently.
❓ query_result
intermediate2:00remaining
What does the balancer do in a MongoDB sharded cluster?
Consider a MongoDB sharded cluster where chunks are unevenly distributed. What is the balancer's role in this scenario?
Attempts:
2 left
💡 Hint
Think about how the system keeps the data balanced across servers.
✗ Incorrect
The balancer moves chunks from busy shards to less busy ones to keep the data spread evenly. This helps maintain performance and storage balance.
📝 Syntax
advanced2:00remaining
Which MongoDB command shows the current chunk distribution across shards?
You want to check how chunks are distributed in your sharded cluster. Which command will give you this information?
Attempts:
2 left
💡 Hint
Look for the command that gives an overview of the sharding setup.
✗ Incorrect
sh.status() shows detailed information about shards, databases, collections, and chunk distribution in the cluster.
🔧 Debug
advanced2:00remaining
Why might the balancer not move chunks even if data is uneven?
In a sharded cluster, the balancer is enabled but chunks are not moving to balance data. Which of the following is a likely cause?
Attempts:
2 left
💡 Hint
Think about what might temporarily stop the balancer from working.
✗ Incorrect
The balancer can be paused or locked during chunk migrations or maintenance, preventing it from moving chunks even if data is uneven.
❓ optimization
expert3:00remaining
How can you optimize chunk size to improve balancer efficiency?
You notice the balancer is moving chunks too frequently, causing overhead. What is a good way to optimize chunk size for better balancer performance?
Attempts:
2 left
💡 Hint
Think about how chunk size affects how often chunks move.
✗ Incorrect
Larger chunks mean fewer chunks overall, so the balancer moves chunks less often, reducing overhead and improving cluster performance.