Live data from Hacker News

Consistent hashing

eli.thegreenplace.net

1–10 of 26 posts

Re: Consistent hashing

#7
Have a look at rendezvous hashing (https://en.wikipedia.org/wiki/Rendezvous_hashing). It's simpler, and more general than 'consistent hashing'. Eg you don't have to muck around with virtual nodes. Everything just works out, even for small numbers of targets.

It's also easier to come up with an exact weighted version of rendezvous hashing. See https://en.wikipedia.org/wiki/Rendezvous_hashing#Weighted_re... for the weighted variant.

Faintly related: if you are into load balancing, you might also want to look into the 'power of 2 choices'. See eg https://www.eecs.harvard.edu/~michaelm/postscripts/mythesis.... or this HN discussion at https://news.ycombinator.com/item?id=37143376

The basic idea is that you can vastly improve on random assignment for load balancing by instead picking two servers at random, and assigning to the less loaded one.

It's an interesting topic in itself, but there's also ways to combine it with consistent hashing / rendezvous hashing.

Re: Consistent hashing

#9
Is it just me or can you describe the whole scheme in one sentence?

tl;dr: subdivide your hash space (say, [0, 2^64)) by the number of slots, then utilize the index of the slot your hash falls in.

Or, in another sense: rely on / rather than % for distribution.

Is this accurate or am I missing something?

Re: Consistent hashing

#10
post #6

The typo is really really bothering me, because the future generations would not be able to search for it.

You can get things like this fixed with the Contact link at the bottom of the page (I just emailed them about it).

It's so much better to copy and paste the title of articles.

Post reply on HN