3

Probably an implementation detail of consistent hashing, IIUC, under ideal conditions, with N servers and K hash functions, we could expect to see NK evenly distributed nodes on the hash ring.

but what if the hash of my servers collide with each other?

  1. ignore them? probably won't work? in the extreme case, all K hashes of my server could be overshadowed by others?
  2. some sort of collision resolution? with my limited hashtable knowledge, it has to be some kind of OpenAddressing?
3
  • Consider rendezvous hashing instead: en.wikipedia.org/wiki/Rendezvous_hashing Commented Nov 13, 2021 at 2:46
  • thanks! looks like rendez vous hashing has no collision, huh? Although it's a bit off topic, I am seeking more insights into the consistent hashing implementation Commented Nov 14, 2021 at 3:03
  • Did you ever get an answer for this? Commented Aug 30, 2023 at 7:26

1 Answer 1

0

If you use SHA-256 as the hashing function, the probability of getting hash collision is too small (less than the number of atoms in the universe) to actually give you a collision in practice.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.