# Talk:Consistent hashing

WikiProject Computer science (Rated Stub-class)
This article is within the scope of WikiProject Computer science, a collaborative effort to improve the coverage of Computer science related articles on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Stub  This article has been rated as Stub-Class on the project's quality scale.
???  This article has not yet received a rating on the project's importance scale.
 This article has been automatically rated by a bot or other tool because one or more other projects use this class. Please ensure the assessment is correct before removing the `|auto=` parameter.
WikiProject Computing / Networking (Rated Stub-class)
This article is within the scope of WikiProject Computing, a collaborative effort to improve the coverage of computers, computing, and information technology on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Stub  This article has been rated as Stub-Class on the project's quality scale.
???  This article has not yet received a rating on the project's importance scale.
 This article has been automatically rated by a bot or other tool as Stub-Class because it uses a stub template. Please ensure the assessment is correct before removing the `|auto=` parameter.

I am after reading this article unable to code a consistent hash. I therefore argue it has failed to explain the core concept involved; the article has only described its functionality. Toby Douglass (talk) 22:48, 5 July 2012 (UTC)

## Confusing K and n notations

I might be the only one but I find the notation ${\displaystyle K}$ for the number of keys and ${\displaystyle n}$ for the number of nodes confusing. I know it is the first letter of each word but usually ${\displaystyle K}$ is used for the number of partitions and ${\displaystyle n}$ for the total number of elements and therefore considered ${\displaystyle K. I think it should either be ${\displaystyle |K|/|n|}$ or changed to ${\displaystyle N/k}$. I wanted to have some opinions before doing this correction. Cmolter (talk) —Preceding undated comment added 16:40, 15 July 2013 (UTC)

Slightly related to this, I want to add that it is not clear whether ${\displaystyle n}$ is the number of slots before or after the resize... Additionally, it be good if this article would clarify what "resizing a hash table" means... does it mean "changing the number of slots"? --Abdull (talk) 14:12, 18 July 2013 (UTC)

There is an alternative algorithm for consistent hashing that is shorter, and that is much more efficient when there is a large numbers of servers. The open source Guava hashing library contributed by Google contains an implementation. See consistentHash() here: https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/hash/Hashing.java

That code doesn't have an explanation of the algorithm, but a preprint now gives one: http://arxiv.org/ftp/arxiv/papers/1406/1406.2294.pdf

As an author of that preprint, it is not appropriate for me to edit this page, but it seems like appropriate subject matter for this page. Johnlamping (talk) 05:02, 13 June 2014 (UTC)

## Technique clarification needed

"Since each bucket is associated with many pseudo-randomly distributed points, the resources that were held by that bucket will now map to many different buckets."

Please explain what this (emphasized part) means. I see that the values for the keys were distributed randomly, but the keys themselves were a contiguous block (the bucket), not random "points" (points on the circle, I assume — the circle analogy is confusing).

"Since each bucket is associated with many pseudo-randomly distributed points, the resources that were held by that bucket will now map to many different buckets."

How?

209.49.110.163 (talk) 21:45, 20 August 2014 (UTC)

I was also confused by this. The confusing bit is that part of the text says a bucket is associated with many points on the circle, but this text seems to suggest that a bucket is a single point. It might be easier to remove the confusing notion of a bucket, and just call it a machine.

"then walks around the circle until falling into the first bucket it encounters (or equivalently, the first available bucket with a higher angle). The result is that each bucket contains all the resources located between its point and the previous bucket point. — Preceding unsigned comment added by 50.158.132.159 (talk) 17:54, 8 February 2015 (UTC)