AdvancedScenario
15 min
Hot Partition in a Sharded Database
DatabasesShardingScalability
Advertisement
Interview Question
Throughput bottlenecks appear on a subset of shards. Outline your approach to identify and mitigate hot partitions.
Key Points to Cover
- Profile per-shard QPS/latency and key distribution
- Detect skewed keys or time-based partitions
- Rebalance/reshard; introduce better partition keys
- Add caching or read replicas for hotspot keys
- Backfill and migrate with minimal downtime
Evaluation Rubric
Profiles per-shard metrics and key skew35% weight
Chooses effective mitigation strategies25% weight
Minimizes migration risk/downtime20% weight
Prevents future skews20% weight
Hints
- 💡Hash+range composite keys can help.
Potential Follow-up Questions
- ❓How do you do online resharding?
- ❓What about secondary index hotspots?
Advertisement