#04Build a wide-column store (Cassandra / DynamoDB family)
One server is not enough — disk fills, throughput maxes, the box dies. Build a multi-node store from first principles: hash sharding, the consistent-hash ring, vnodes, replication, eventual consistency, tunable W+R quorum, hinted handoff, read repair. Every modern Dynamo-style store is a point in this design space.

You have run a single-node KV or SQL database. Maybe you have watched the disk fill. Maybe you have watched throughput peg the ceiling. Maybe you have watched the box die and taken your data with it. The single server has three ways to die — and bigger disks, faster CPUs, and more RAM make those three problems quantitatively softer, but never qualitatively softer. To survive any of them, you need more than one machine. That is the brief.

The wide-column store is the family of distributed databases that took that brief seriously: Cassandra, DynamoDB, ScyllaDB, Riak. They share a load-bearing design — Dynamo-style hash partitioning, tunable consistency, anti-entropy — that is so widely deployed it is the default mental model for "database that survives a node death." Once you have built one from first principles, every later distributed database collapses to a point in this design space.

Resist the urge to memorize Cassandra's command-line flags. Build the system from the failure that motivates each step. The first server fails three ways; the cheapest fix shards by key; sharding by hash mod N reshuffles 80% of keys when you add a server; the ring fixes it but creates uneven arcs; vnodes fix the unevenness; copies survive a node death; copies that disagree need a winner; counting replicas (W+R>N) gives you reads that see writes; partitions force a choice; hinted handoff softens the everyday case; read repair and anti-entropy heal the rest; gossip tells the cluster who is alive. Twelve scenes; twelve choices; one design canvas at the end.

Builds on: Columnar OLAP · LSM trees — 2-min primers appear where needed.
Reading: DeCandia et al. — Dynamo: Amazon's Highly Available Key-value Store (SOSP 2007) · Chang et al. — Bigtable: A Distributed Storage System for Structured Data (OSDI 2006) · Cassandra documentation — cassandra.apache.org/doc/ (Architecture, Operations, Data Modeling) · Sivasubramanian et al. — Amazon DynamoDB: A Scalable, Predictably Performant, and Fully Managed NoSQL Database Service (USENIX ATC 2022) · Aphyr — Jepsen reports on Cassandra and DynamoDB (jepsen.io/analyses) · Kleppmann — Designing Data-Intensive Applications, Chapters 5–9
single-node ceiling — capacity, throughput, durability
hash mod N sharding and its (N-1)/N rebalance catastrophe
consistent hashing — ring + arcs
virtual nodes (vnodes) — flatten load, spread death
replication factor and successor replicas
eventual consistency + last-write-wins (LWW)
tunable consistency — W+R>N, ONE/QUORUM/ALL
CAP under partition — per-request availability vs consistency
hinted handoff — optimistic recovery + hint TTL
read repair + anti-entropy via Merkle trees
gossip — O(log N) cluster-state convergence
design canvas — pick every knob against a workload