
Cache-Aside vs Write-Through
0 views · Aug 2026
sandboxed iframe · 45s loop · 27 KB
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.

0 views · Aug 2026

13 views · Aug 2026

4 views · Aug 2026

6 views · Aug 2026

2 views · Aug 2026