TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Consistent Hashing

167 pointsby aqrashikabout 13 years ago

6 comments

sdaveabout 13 years ago
trivia ex-Akamai-ite here: Danny Lewin was one of the co-inventors of this. RIP.(<a href="http://en.wikipedia.org/wiki/Danny_Lewin" rel="nofollow">http://en.wikipedia.org/wiki/Danny_Lewin</a>) link to original paper: <a href="http://www.akamai.com/dl/technical_publications/ConsistenHashingandRandomTreesDistributedCachingprotocolsforrelievingHotSpotsontheworldwideweb.pdf" rel="nofollow">http://www.akamai.com/dl/technical_publications/ConsistenHas...</a>
notmynameabout 13 years ago
A coworker of mine wrote a series of posts on how to build a consistent hashing ring and expand it with the concepts or weighted nodes and availability zones.<p><a href="http://www.tlohg.com/p/building-consistent-hashing-ring.html" rel="nofollow">http://www.tlohg.com/p/building-consistent-hashing-ring.html</a><p>Those ideas for the core of the consistent hashing found in Openstack swift (a large-scale distributed object storage system).
slackerIIIabout 13 years ago
Ha, what a neat way to wake up -- my blog on HN. Thanks guys.
评论 #3750412 未加载
评论 #3750680 未加载
harryfabout 13 years ago
If you're using memcached, using consistent hashing is largely a matter of configuration on the client side (although it's worth understanding how it works and why you want it). Pretty much any memcached client that's built on libmemcached comes with it although most aren't using it by default; the overhead of calculating the ring is significant and needs to be thought about e.g where you store it - not something you want to do on every request.
jhaileabout 13 years ago
redis also supports consistent hashing in many of its drivers (including the Ruby one). It also supports a nifty way to only use part of the key as the consistent hashing key so that you can ensure certain data is stored on the same server. For example, if you use the key "mydata-{123}" only the "123" part will be used by the consistent hashing algorithm. Of course, Riak is also a good example of consistent hashing.
jedbergabout 13 years ago
It always boggles my mind that more people don't know this. Every presentation I give, I always try to put in a slide about consistent key hashing, because it is one of the easiest things to get right and yet something I see most everyone get wrong (including myself the first time around).