Mission
Interactive Simulation
Before we explain anything — play. Push it until it breaks, then fix it.
Writes per shard
user query touches 1.0 shardBar height = load vs. each shard's 2.5K/s capacity.
Load
Partitioning
Break it
What just happened?
Sharding split the data across multiple databases by a shard key, so writes and storage spread out — but a bad key created hot partitions.
The concept
Sharding (horizontal partitioning) splits data across multiple databases by a shard key. Range sharding splits by key ranges; hash sharding distributes by a hash of the key. Unlike replication, sharding scales writes and storage, not just reads.
Trade-offs
Nothing is free. Here's what this solution costs you.
Mini quiz
Sharding scales what that replication does not?
Interview me
The app becomes your interviewer. One question, in your own words.
Boss challenge
Design a shard key
12K writes/s, and a celebrity account is driving 30% of them.
Goal: Keep errors under 1% and the hottest shard under 90% load.
Use the simulator above with no hints. These checks update live as you play.
Interview question
“Explain range vs hash sharding, how to choose a shard key, and how to avoid hot partitions.”