🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Sharding

In plain terms

Splitting a database across multiple machines by partitioning the data.

Going deeper

Sharding distributes rows across servers (shards) based on a key, so each holds a slice of the data. It lets databases scale beyond one machine's limits, at the cost of more complex queries spanning shards.

Under the hood

Shard-key choice is critical to avoid hotspots; cross-shard joins and transactions are hard, and rebalancing on node changes is a major operational concern.

Examples

User data partitioned by user_id, Vitess, MongoDB sharded clusters, Citus.

Think of it like...

Like splitting one overflowing phone book into volumes Aโ€“H, Iโ€“P, Qโ€“Z, each kept in a different office.

Feedback & Bug Report