Tutorvo

Consistent Hashing: Servers and Keys on a Ring, Next Server Clockwise and Keys Moved When a Server Joins

Lesson 6 of 815 minLab

This lesson is part of the course

In this lesson

You place three servers and twelve keys on a ring from 0 to 999, give every key to the next server clockwise with MINIFS and a wrap-around, let a fourth server join and count how few keys move.

Buy the course once for $9.99 to unlock every lesson and lab, the final exam and the certificate – lifetime access, no subscription.

Lessons in this course

  1. Round Robin: Request Number to Server with MOD, Requests per Server and Uneven SpeedsLab15 min Locked
  2. Weighted Round Robin: Weights, Expected Shares, a Weighted Cycle and Its ErrorLab15 min Locked
  3. Least Connections: Open Connections per Step, Chosen Server with MIN + MATCH, Finishing RequestsLab15 min Locked
  4. Hash Mod N: Given Hash Values, Server = MOD(hash, N), Keys per Server and ImbalanceLab15 min Locked
  5. The Cost of Rehashing: From N to N + 1 Servers, Keys That Move and Why It Is So HighLab15 min Locked
  6. Consistent Hashing: Servers and Keys on a Ring, Next Server Clockwise and Keys Moved When a Server JoinsLab15 min Locked
  7. Virtual Nodes: Several Positions per Server, Arcs of the Ring, Load Spread and How Many to UseLab15 min Locked
  8. Capacity & Failover: Servers for a Target Utilisation, N + 1, Load After a Failure and a ChartLab15 min Locked