🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Consistent Hashing: all 15 questions

Quiz: Consistent Hashing · Question 8 of 15

Why should you not use Python's built-in hash() for strings to place keys on a ring?

Why should you not use Python's built-in hash() for strings to place keys on a ring?

  1. A.It is too slow
  2. B.It is randomised per process, so different servers would compute different positions
  3. C.It only returns 0 or 1
  4. D.It cannot hash strings
Answer & explanation

Correct answer: It is randomised per process, so different servers would compute different positions

String hashing is salted per run; use a stable hash like MD5 or MurmurHash.

Can you get the rest right without peeking?

Take the timed Quiz: Consistent Hashing quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →