Consistent Hashing and Random Trees: Distributed Caching Protocols for Relieving Hot Spots on the World Wide Web
David Karger, Eric Lehman, Tom Leighton, et al.1997STOC 1997
Read it on doi.org(opens in a new tab)Why this one
Read this after Dynamo: Amazon's Highly Available Key-value Store, because Dynamo turns this idea into an operating storage system. The useful trick here is not "hash keys to servers". Everyone already had that. The trick is making membership change cheap, so adding or losing a machine does not mean rewriting the world. Consistent hashing gives you a way to spread keys across a moving set of nodes while only disturbing a small slice of the assignment. That single property shows up in cache rings, database partitions, load balancers, queue ownership, and modern LLM serving fleets. People often treat the ring diagram as the whole paper, then miss the second half: hot spots are a separate problem, and random trees are an early attempt to route demand so popularity does not melt one place. Worth your evening because once you see this abstraction, many "distributed systems" designs reduce to deciding who owns which keys, how ownership moves, and what happens when one key gets too popular.
What to take away
- Consistent hashing minimizes key movement when servers join or leave, which is the core requirement for elastic sharding.
- Virtual nodes smooth uneven load by giving each physical machine many positions on the hash ring.
- Random trees attack hot objects by spreading request paths instead of only balancing key ownership.
Reads with
- Dynamo: Amazon's Highly Available Key-value Store
turns cheap membership changes into an operating storage system
- Chord: A Scalable Peer-to-peer Lookup Service for Internet Applications
uses the same ring idea to make lookup routing scalable
- Scaling Memcache at Facebook
shows the cache-fleet version of key ownership and hot spot control