PrepCity

Consistent hashing for shards

Open the lab

By the last page, this is the design you will have built.

Lesson · 7 pages · about 5 min

Consistent hashing for shards

A partition key and every shard host’s tokens sit on one ring; the key belongs to the next token clockwise, so a new host takes over only one slice.

Words you’ll learn

  • Partition key
  • Shard
  • Router
  • Virtual node
  • Database
  • Request
  • Row
  • Replica

Page by page