walkclear

Consistent hashing

draftPublished September 21, 2026
fundamentalssharding

TL;DR

With hash(key) % N, changing N remaps almost every key. Consistent hashing places nodes and keys on a ring, and each key belongs to the next node clockwise. Adding or removing a node only affects its neighbours.

Open questions

  • How many virtual nodes are enough to even out the load?

Changelog

  • 2026-09-21: Stub. Expand with the ring diagram and virtual nodes.

Related

Used in