← All topics
Quiz: Consistent Hashing: questions with answers
15 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. With hash(key) % N, roughly what share of keys moves when going from 4 to 5 servers?
- Q2. On a consistent hash ring, which server owns a key?
- Q3. What does this print? (code)
- Q4. A new server E is added to a ring of four servers. Which keys move?
- Q5. What problem do virtual nodes mainly solve?
- Q6. A server with double the RAM should hold double the keys. How do you do this with consistent hashing?
- Q7. What does this print? (code)
- Q8. Why should you not use Python's built-in hash() for strings to place keys on a ring?
- Q9. With replication factor 3 on a ring, where is a key stored?
- Q10. When a server with many virtual nodes crashes, what happens to its keys?
- Q11. A cache cluster uses hash(key) % N and one of its 4 servers crashes. Why is this so harmful?
- Q12. On a ring with servers at positions 100, 200 and 300 (out of 360), a key hashes to 350. Which server owns it?
- Q13. What does this print? (code)
- Q14. With consistent hashing, roughly what share of keys should move when one server is added to N servers?
- Q15. What does Redis Cluster use instead of a hash ring?