Consistent Hashing Visualized
We render the hash ring and drop keys onto it: each key lands on the first node clockwise from its hash. Then a node dies, and we count exactly which keys remap — that count is the whole point of the algorithm.
Topics covered:
- The ring: mapping nodes and keys into a shared hash space
- Clockwise assignment: which node owns a given key
- Node failure: why only the dead node's keys move
- Imbalance: why real nodes are unevenly spaced on the ring
- Virtual nodes: how replicating a node's presence balances load
- Modulo sharding compared: why a rehash touches every key
- Production reality: Cassandra's vnodes and Memcached client behavior
Related articles
Distributed Caching Consistency Models
Cache-aside, write-through, and write-behind caches compared by what the machine does on failure: invalidation races, stampedes, and coherence.
Eventual Consistency Is a Spectrum
Strong, causal, read-your-writes — the consistency zoo and when each model is the right engineering choice.
Why Distributed Systems Are Hard
The CAP theorem's real meaning, partial failures, and the eight fallacies — why networked code is a different discipline.
More in Distributed Systems
Raft Consensus Explained
Leader election, log replication, and safety — the consensus algorithm that powers etcd, CockroachDB, and TiKV, explained from first principles.
WatchData Partitioning Explained
Range, hash, and hybrid partitioning — where each key's row actually lives, how partitions are balanced, and what happens when one partition becomes a hotspot.
DetailsDistributed Locks and Leases
What a lock actually protects in a distributed system — lease-based locks with expiry, fencing tokens against stale holders, and why client crashes are the hard case.
DetailsGossip Protocols
Membership, failure detection, and state propagation — how nodes exchange information through random peer conversations so the whole cluster converges without a coordinator.
DetailsChaos Engineering Basics
Fault injection with a controlled blast radius — killing nodes, dropping packets, and inducing latency to verify that recovery paths actually work, not just that they exist.
DetailsDistributed Tracing Explained
Trace context propagation, span trees, and sampling — how one request's work is reconstructed across services using trace IDs, span IDs, and parent-child relationships.
DetailsLeader Election in Practice
How real systems elect leaders — ZooKeeper's Zab, etcd's Raft, and lease-based locks — plus fencing tokens and why a stale leader must be fenced before it writes.
DetailsDistributed Transactions Explained
Two-phase commit, prepare and commit phases, and the coordinator failure window — how databases coordinate atomic writes across machines and what happens when a participant crashes.
DetailsRaft Consensus Visualized
See Raft's term clock, randomized leader election, and log replication in motion — what actually happens in etcd, CockroachDB, and TiKV when a server fails or the network splits.
DetailsDepth, delivered weekly
One technical dispatch a week — articles and episode notes before they go public.
One technical dispatch per week. No noise.