diff/reel
All reels

sandboxed iframe · 45s loop · 27 KB

Databases

Replication vs Sharding

Copy every write to every node, or send each write to exactly one.

Posted Aug 15, 2026 · 3 views

Both put more than one database node behind your application, for opposite reasons.

Replication copies the same write to every node. Every node holds the same data, so any of them can serve a read — reads scale, and a lost node loses no data. Writes do not get cheaper: every node still does all of them.

Sharding routes each write to one node by its shard key. Each node holds a slice, so total capacity grows with the node count — and a query that does not name the key has to ask every shard, while a lost shard takes its slice with it.

Watch the labels in the animation: identical on every node under replication, disjoint under sharding.

Related reels