Consistent hashing

In computer science, consistent hashing[1][2] is a special kind of hashing technique such that when a hash table is resized, only keys need to be remapped on average where is the number of keys and is the number of slots. In contrast, in most traditional hash tables, a change in the number of array slots causes nearly all keys to be remapped because the mapping between the keys and the slots is defined by a modular operation.

Consistent hashing evenly distributes cache keys across shards, even if some of the shards crash or become unavailable.[3]

  1. ^ Cite error: The named reference KargerEtAl1997 was invoked but never defined (see the help page).
  2. ^ Cite error: The named reference nuggets was invoked but never defined (see the help page).
  3. ^ Designing Distributed Systems Patterns and Paradigms for Scalable, Reliable Services. O'Reilly Media. 2018. ISBN 9781491983607.