Skip to main content
QUICK REVIEW

[Paper Review] AnchorHash: A Scalable Consistent Hash

Gal Mendelson, Shay Vargaftik|arXiv (Cornell University)|Dec 23, 2018
Caching and Content DeliveryComputer Science19 references3 citations
TL;DR

AnchorHash is a novel consistent hashing algorithm that ensures minimal disruption, perfect balance, and high scalability by leveraging historical state to maintain consistency during arbitrary resource additions and removals. It achieves a key lookup rate of over 15 million keys per second at scale, with only a few bytes of memory per resource and negligible update time, outperforming existing methods like MaglevHash and HRW in consistency and efficiency.

ABSTRACT

Consistent hashing (CH) is a central building block in many networking applications, from datacenter load-balancing to distributed storage. Unfortunately, state-of-the-art CH solutions cannot ensure full consistency under arbitrary changes and/or cannot scale while maintaining reasonable memory footprints and update times. We present AnchorHash, a scalable and fully-consistent hashing algorithm. AnchorHash achieves high key lookup rates, a low memory footprint, and low update times. We formally establish its strong theoretical guarantees, and present advanced implementations with a memory footprint of only a few bytes per resource. Moreover, extensive evaluations indicate that it outperforms state-of-the-art algorithms, and that it can scale on a single core to 100 million resources while still achieving a key lookup rate of more than 15 million keys per second.

Motivation & Objective

  • To address the limitations of existing consistent hashing schemes that sacrifice full consistency or scalability under arbitrary resource changes.
  • To design a consistent hashing algorithm that guarantees minimal disruption and perfect load balancing while scaling efficiently to millions of resources.
  • To reduce memory footprint and update time without compromising lookup performance or consistency.
  • To formally prove theoretical guarantees on average hash computation count under adversarial resource failure conditions.
  • To implement and evaluate a practical, stateful algorithm that maintains consistency across dynamic resource changes.

Proposed method

  • AnchorHash maps keys through successive reductions of available resources using a fixed-size anchor set, ensuring consistency by tracking past resource states.
  • It uses indirection via buckets to map keys to resources, with the anchor set acting as a historical reference to minimize remapping.
  • The algorithm ensures minimal disruption by relying on past resource removal and addition order, maintaining consistency even under arbitrary changes.
  • It employs a recursive hashing process where each step reduces the set of candidate resources until a unique mapping is found.
  • The data structure is optimized to achieve O(1) memory footprint per resource through advanced representation techniques.
  • Theoretical analysis proves that average hash computations per key are bounded by ~1.69 even under 50% adversarial resource removal, with low standard deviation (~0.83).

Experimental results

Research questions

  • RQ1Can a consistent hashing scheme maintain minimal disruption and perfect balance under arbitrary resource additions and removals?
  • RQ2What is the theoretical upper bound on the average number of hash computations required per key lookup under adversarial resource failure?
  • RQ3Can a consistent hashing algorithm achieve high key lookup rate, low memory footprint, and negligible update time simultaneously at scale?
  • RQ4How does the size of the anchor set affect load balancing and performance in practice?
  • RQ5Can a stateful consistent hashing scheme maintain full consistency in distributed environments with disagreement on resource removal order?

Key findings

  • AnchorHash achieves a key lookup rate exceeding 15 million keys per second on a single core, even at 100 million resources.
  • The average number of hash computations per key lookup is bounded at approximately 1.69, even when 50% of resources are removed adversarially.
  • The standard deviation of hash computation count is less than 0.83, indicating high predictability and low variance in performance.
  • Over 90% of key lookups terminate after a single hash operation, and less than 0.5% require more than two operations.
  • AnchorHash maintains perfect load balancing across all tested configurations, with oversubscription approaching zero as key count increases.
  • Update time for AnchorHash is negligible and independent of system size, operating in the nanosecond range, unlike MaglevHash and Ring, which scale poorly.

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.