Quick Answer
Avoid shard hotspots by choosing a shard key with even write distribution. Don't use monotonically increasing keys (timestamps, ObjectId) as shard keys - all new writes go to the last chunk on one shard. Solutions: use hashed shard key (distributes writes randomly), use compound shard key combining a high-write field with a hash component, or pre-split chunks before loading data.
Answer
Avoid monotonically increasing keys and choose high-cardinality shard keys or hashed keys for even write distribution.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.
MongoDB interview questions and answers for beginner, junior, mid-level, senior, and expert developers. Perfect for freshers and experienced candidates.