Senior Track Roadmap

System Design: consistent hashing

Consistent hashing decides which of N servers holds a key, so that every participant computes the same answer with no coordination. The course separates hashing for identity from hashing for placement, measures how modulo placement moves most keys when a cluster resizes, and builds the ring with virtual nodes. It covers replication on the first R distinct nodes, rack and zone awareness, and hot keys. It looks at memcached, Dynamo, Cassandra, Redis Cluster and load balancers, compares rendezvous and jump hashing, and ends with a rendezvous hashing challenge.

What you'll learn

  • ✓The difference between hashing for identity and hashing for placement
  • ✓Why modulo placement moves almost every key when a node is added
  • ✓How the ring and virtual nodes limit movement and even out distribution
  • ✓Replication on distinct nodes, rack and zone awareness, and hot keys
  • ✓Where memcached, Dynamo, Cassandra, Redis Cluster and load balancers use these ideas
  • ✓When rendezvous hashing, jump consistent hash or a single node fits better
Free preview · Lesson 1 4 min read

Hashing for identity versus placement

This application hashes things in three places, and none of them is what consistent hashing is for. Seeing the difference is the fastest way into the topic.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...