Consistent hashing explained simply with 10 keys
Consistent hashing explained simply: keep the hash space fixed when the server count changes, then move only the key range claimed or released by one server.
The ring picture is useful, but the movement count is the point. With a small fixed example, ordinary modulo hashing moves seven of ten keys when a server is added. A hash ring moves one.
That reduction does not make the system replicated, available, or balanced by request traffic. Those need separate mechanisms.
In this article
- Why modulo hashing remaps most keys
- Consistent hashing explained simply on a 0 to 99 ring
- Add one server and count one moved key
- One point per server creates skew
- Virtual nodes spread ownership across the ring
- Replication is a second decision
- Membership and failure detection sit outside the ring
- Uniform keys do not mean uniform traffic
- A hash ring is not the only consistent scheme
- Review the mechanism in this order
Continue reading
This field note is part of Fanout Pro, with the complete archive, courses, labs, and every Daily paper guide.
See plans