/
References & Glossary for consistent hashing

References & Glossary for consistent hashing

Example from Alex Xu.

We have 4 servers and 8 string keys with their hashes.

Key

Hash

Hash % 4

Key

Hash

Hash % 4

key0

18358617

1

key1

26143584

0

key2

18131146

2

key3

35863496

0

key4

34085809

1

key5

27581703

3

key6

38164978

2

key7

22530351

3

 

We have 3 servers and 8 string keys with their hashes : 1 server goes offline.

Key

Hash

Hash % 3

Key

Hash

Hash % 3

key0

18358617

0

key1

26143584

0

key2

18131146

1

key3

35863496

2

key4

34085809

1

key5

27581703

0

key6

38164978

1

key7

22530351

0