Partitioning Goals: Scaling Beyond One Node
What This Concept Is
Partitioning (also called sharding) means splitting one logical dataset across several nodes so that each node holds only a slice. Replication gives you many copies of all the data; partitioning gives you many pieces of one dataset. Real systems almost always combine both.
The canonical reasons to partition:
- Scalability of storage: when one dataset exceeds the largest practical disk (or the largest practical backup window), it must be split.
- Scalability of write throughput: one leader has a ceiling of writes per second. Partitioning by key spreads writes across
Nleaders, multiplying the ceiling roughly linearly. - Query parallelism: a query that must touch many rows can run in parallel across partitions (Map-Reduce-style) instead of sequentially on one node.
- Failure isolation: losing one partition loses only a slice of data, not the whole service (assuming the slice is also replicated).
Partitioning turns "how big can one machine be?" into "how many machines can I afford?" That is a qualitatively different question, and it introduces new failure modes: uneven splits, hotspots, cross-partition queries, and rebalancing.
Why It Matters Here
Everything in Cluster 4 (partitioning strategies) is about answering "by what key?" and "using what scheme?" That cluster only makes sense if you have internalized that partitioning is not free. You gain throughput and storage; you pay with routing, cross-partition coordination, and a new class of operational tasks (rebalancing, splitting, merging).
Partitioning also changes how you think about writes: a transaction that was trivial on one node (a single INSERT) becomes a coordination problem (which node owns this key?) that must be solved before any row is written.