The Simple Magic of Consistent Hashing by Mathias Meyer.
From the post:
The simplicity of consistent hashing is pretty mind-blowing. Here you have a number of nodes in a cluster of databases, or in a cluster of web caches. How do you figure out where the data for a particular key goes in that cluster?
You apply a hash function to the key. That’s it? Yeah, that’s the whole deal of consistent hashing. It’s in the name, isn’t it?
The same key will always return the same hash code (hopefully), so once you’ve figured out how you spread out a range of keys across the nodes available, you can always find the right node by looking at the hash code for a key.
It’s pretty ingenious, if you ask me. It was cooked up in the lab chambers at Akamai, back in the late nineties. You should go and read the original paper right after we’re done here.
A must read, for a variety of reasons. One of which is to build expandable and robust data structures.
Another is to reach a deeper understanding of hashing, consistent or otherwise.
Question: Does consistency mean within a system or across systems?