</> MAANG.io
system design Β· 201

Intermediate

Master system design interviews with scalable architecture patterns, distributed systems, and real-world design challenges.

0/124 solved 0% complete

Consistent Hashing

maang.io System Design Series


Consistent hashing maps both keys and nodes onto the same circular hash space, so each key is owned by the next node clockwise. Its superpower: when a node joins or leaves, only the keys in its immediate arc move β€” roughly 1/N of the data β€” instead of the near-total reshuffle that plain hash % N inflicts. It's the distribution engine inside Cassandra, DynamoDB, memcached clients, and CDNs.

This deep dive comes in three parts:

  • Foundations & Core Concepts β€” the ring, clockwise ownership, and why hash % N falls apart.
  • Internals β€” virtual nodes for balance, remapping math, and bounded-load variants, with worked numbers.
  • Interview β€” Staff/Principal Q&A: rebalancing, hot spots, and where it shows up in real designs.

Sign in to MAANG.io

Use your Google or Microsoft account β€” no password to remember.

Continue with Google Continue with Microsoft

Please accept the terms above to continue.