← All tutorials
Skill Zuno · skillzunos.com · System Design
Hashing tutorial
Learn Hashing on Skill Zuno. This Hashing tutorial covers New, Easy, Medium, Hard, and Diff levels so you can study practical Hashing problems on skillzunos.com.
Open Hashing on Skill ZunoAlso see the Hashing interview questions.
Hashing maps data of any size to a fixed-size value, and distributed systems use it to decide where data lives. Simple modulo hashing reshuffles almost every key when servers change, so systems use consistent hashing or rendezvous hashing instead. Interviews cover hash functions, partitioning with consistent hashing, virtual nodes and hot spots.
Hashing topics covered
- Hash functions and their properties — Determinism, uniform distribution and speed, and the difference from cryptographic hashes.
- Modulo hashing and its problem — Why hash(key) mod N moves almost every key when N changes.
- Consistent hashing — Placing servers and keys on a ring so adding a server moves only about 1/N of the keys.
- Virtual nodes — Giving each server many positions on the ring for an even spread and smooth rebalancing.
- Rendezvous hashing — Picking the server with the highest hash score for each key, an alternative with no ring to maintain.
- Hot keys and skew — What to do when one key gets far more traffic than the hash can spread.
What you can learn
- Hashing tutorial for beginners and experienced developers
- Level-based practice: New, Easy, Medium, Hard, and Diff
- System Design topics alongside Hashing on skillzunos.com