Index

System Design · Consistent hashing: virtual nodes

The ring

The ring only rehomes 1/N of the keys when a server dies. So why does everyone run two hundred virtual nodes per server?

Sixteen servers sit at points around a circle, and every key walks clockwise to the first server it meets. The bars show how many keys each one ended up holding, against a fair share at the halfway mark. Add more points per server and watch the bars level out while the rehoming figure barely moves.

Board: Splitting the Ledger →

Sixteen load bars, a removal readout and the whole dial as a table. The panels stack on a narrow screen.

try this Drag Points on the ring per server from one upward, stay on Walk clockwise to the next server, and watch What the balance costs.

Included with a plan

This lab is included with a plan. The first three lessons of every track are free, with their boards and videos. A plan unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

see also Dynamo: Amazon's Highly Available Key-value Store and Consistent Hashing and Random Trees in Papers.