The Simple Magic of Consistent Hashing | Mathias Meyer
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. Consistent hashing solves the problem people desperately tried to apply sharding to pretty nicely and elegantly. I’m not going to bore you with the details on how exactly consistent hashing works. Mike Perham does a pretty good j
Mathias Meyer December 9, 2011 Tags nosql riak 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 lo
Explore this link on the map →related reading
- Hash-Range Partitioning | ben.kirw.inben.kirw.in
- Distributed systems for fun and profitbook.mixu.net
- Database Fundamentalstontinton.com
- A Distributed Systems Reading Listferd.ca
- k8s-1m Overviewbchess.github.io
- Sharding - Database Manual - MongoDB Docsmongodb.com
- Core Concepts for System Design Interviews | Hello Interview System Design in a Hurryhellointerview.com
- Build Your Own Databasenan.fyi
- Introduction to Locality-Sensitive Hashingtylerneylon.com
- An Overview of Distributed PostgreSQL... | Crunchy Data Blogcrunchydata.com
- Read-Your-Writes Consistencyarpitbhayani.me
- The Architecture of Open Source Applications (Volume 2)Scalable Web Architecture and Distributed Systemsaosabook.org