Skip to main content
QUICK REVIEW

[Paper Review] Multi-probe consistent hashing

Ben Appleton, Michael O’Reilly|arXiv (Cornell University)|May 1, 2015
Algorithms and Data CompressionComputer Science12 citations
TL;DR

This paper proposes multi-probe consistent hashing, a novel consistent hashing algorithm that achieves a peak-to-average load ratio of $1+\varepsilon$ using only $O(1)$ space per node and $O(1/\varepsilon)$ time per lookup. By hashing each key multiple times and assigning it to the nearest node in the hash ring, it balances load effectively without requiring virtual nodes or precomputed hierarchies.

ABSTRACT

We describe a consistent hashing algorithm which performs multiple lookups per key in a hash table of nodes. It requires no additional storage beyond the hash table, and achieves a peak-to-average load ratio of 1 + epsilon with just 1 + 1/epsilon lookups per key.

Motivation & Objective

  • To address the high peak-to-average load ratio in traditional consistent hashing schemes, which can reach $\Theta(\ln n)$ under naive hashing.
  • To design a consistent hashing algorithm that maintains $O(n)$ space, $O(1)$ amortized update time, and $O(1)$ lookup time while achieving a near-optimal peak-to-average load ratio.
  • To overcome limitations of existing methods like ring consistent hashing (high memory) and jump consistent hash (no node removal support) by enabling efficient, consistent, and scalable load balancing.
  • To provide a practical alternative to ring consistent hashing that scales to large node counts without prohibitive memory or initialization costs.

Proposed method

  • The algorithm hashes each key $K$ times to the unit ring and assigns the key to the node closest to any of the $K$ key hashes.
  • It uses a single hash table to store physical nodes, eliminating the need for virtual nodes and reducing memory overhead.
  • The method leverages the statistical properties of Poisson processes and exponential spacing to bound the maximum load using $K=2$ probes.
  • For $K \geq 2$ and $K \ll \sqrt{n}/\ln n$, the expected peak load is $\frac{K}{K-1} \cdot \frac{1}{n} + o(1/n)$, ensuring a peak-to-average ratio of $1+\varepsilon$ with $K=1+1/\varepsilon$.
  • The algorithm supports dynamic node insertion and removal with $O(1)$ amortized time per operation, maintaining consistency.
  • It avoids pre-agreed hierarchies or precomputed structures, enabling deployment in distributed systems with dynamic node sets.

Experimental results

Research questions

  • RQ1Can consistent hashing achieve a peak-to-average load ratio of $1+\varepsilon$ with only $O(n)$ space and $O(1)$ amortized update time?
  • RQ2Is it possible to reduce the peak-to-average load ratio from $\Theta(\ln n)$ to $O(1)$ using only $O(1)$ additional probes per key without virtual nodes?
  • RQ3How does multi-probe consistent hashing compare to ring consistent hashing in terms of memory usage, initialization, and update performance?
  • RQ4Can the method support arbitrary node removal while maintaining load balance and consistency?
  • RQ5What is the performance trade-off between load balance and lookup time when using $K=2$ probes?

Key findings

  • With $K=2$ key probes, the expected peak-to-average load ratio is bounded at $2$, achieving a $1.05$ ratio in practice with $350-600$ ns per key assignment.
  • The algorithm requires only $O(n)$ space, storing each node once in a hash table, and supports $O(1)$ amortized time for insertions and removals.
  • Initialization time per node is constant at ~40 ns for up to 100,000 nodes, in contrast to ring consistent hashing, which scales poorly with initialization time growing as $O(n \ln n / \varepsilon^2)$.
  • Lookup time is $O(1/\varepsilon)$, with $O(1)$ time per key when $\varepsilon=0.05$, and remains stable even at 100,000 nodes.
  • Update time is $O(1)$ amortized, significantly outperforming ring consistent hashing, which requires orders of magnitude more time per update.
  • The method scales to larger node sets than ring consistent hashing due to its constant memory and initialization overhead, making it suitable for large-scale distributed systems.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.