Distributed Systems · Cluster
Partitioning
Sharding, rebalancing, and hot spots.
- 01 Hash Partitioning and the Range Query It Destroys How modulo hashing places keys on nodes without any directory, why the same function makes ordered access impossible, and what a resize really moves.
- 02 Consistent Hashing Rings and Virtual Node Counts Why a ring moves only 1/(n+1) of the keys when a node joins, how virtual nodes fix the variance, and what the load spread looks like at realistic counts.
- 03 Range Partition Boundaries and the Split Key Contract How ordered partitions are divided, why a split key is a durable fact rather than a hint, and what happens when boundaries are chosen badly.
- 04 Shard Migration Cutover and the Dual-Write Window How a partition moves between machines without losing writes, why the cutover is a state machine rather than a copy, and what has to be true before the source is retired.
- 05 Why Append-Only Keys Concentrate Load on One Shard Monotonic keys place every insert at the end of the key space, so one partition absorbs the write traffic. The fixes, from bit-reversal to bucket suffixes, and what each costs.
- 06 Routing Metadata Staleness and the Cost of a Wrong Guess Every client caches a map from key to node, and every cache is wrong eventually. How epochs, redirects, and fencing turn a stale guess into a retry instead of a lost write.
- 07 Scatter-Gather Fan-Out and Tail Latency Multiplication A query over P partitions waits for the slowest one, so the 99th percentile of a single node becomes the median of the cluster. How hedged requests and partial results change the curve.
- 08 Local and Global Secondary Indexes Under Partitioning An index can be partitioned with the data or by the indexed value. The first makes writes cheap and reads expensive; the second inverts it, and neither is free.
- 09 Rebalance Storms and the Backpressure That Prevents Them When a node fails, every partition it held becomes a migration at once. Why the recovery traffic can exceed the cluster bandwidth, and how admission control keeps the two from feeding each other.
- 10 Splitting a Partition While Writes Continue The in-place split protocol: freeze, cut, publish, then let readers discover the new boundary. Why the split point is a durable record and why the parent must keep serving.