Sign in
TodayMapLearnPracticeReview
All labs
Lab 10 · Data

Sharding Lab

See how shard count and key skew affect write distribution and the hottest partition.

What problem are we solving?
A single database eventually becomes the bottleneck. Sharding spreads the dataset and workload, but a bad partition key can still create a hot shard.
Live simulation
updates every 1s
Shard 11500 w/shealthy
Shard 21000 w/shealthy
Shard 31000 w/shealthy
Shard 41000 w/shealthy
Controls
4
4000 w/s
10%
Live metrics
Ideal writes / shard1000 w/s
Hot shard1500 w/s
Shard count4
What just happened?
A good partition key keeps load balanced. Increasing shard count gives more capacity, but a hot key can still concentrate traffic on one partition.
Try this

Hot celebrity key

Push skew above 60%. Notice how the hottest shard becomes the real bottleneck even though total capacity increased.

How would you fix the hot key without rebuilding the entire dataset?

Key takeaway
Sharding increases capacity only if the partitioning strategy keeps the work distributed.
Related concepts
  • Sharding
  • Consistent Hashing
  • Denormalization