Definition · Virtual nodeA virtual node, or token, is one position a physical node occupies on the ring. A node with V tokens owns the union of the V arcs ending at them, and its share is the total length of that union as a fraction of the ring. Keys are assigned by successor ownership: a key belongs to the first token at or after its position, clockwise, wrapping at the end.
The quantity to measure is the shares, and the two ways of describing how uneven they are answer different questions. max/mean is what the fullest node costs you, and it is the number a capacity plan needs. The relative spread — the root-mean-square deviation of the shares divided by the mean share — is what falls at a clean rate, and it is the number that tells you what another token is worth.
8 nodes, shares measured over 8 seeded rings
V tokens on the ring max/mean spread 1/√V, stated
1 8 3.349 1.0370 1.0000
10 80 1.520 0.3309 0.3162
100 800 1.141 0.0959 0.1000
the drawn ring, seed 5, V = 1
largest node 28.29% of the ring = 2.263 × an equal share of 12.50%
smallest node 2.95% = 0.236 × the mean
the shares add to 1 — nothing is missing, they are simply not equal
The two numbers do not go to the same place
The spread goes to zero and max/mean goes to one, and reading the wrong one as the other makes V look either better or worse than it is. At V = 100 the spread is 0.0959 — about a tenth of what it was — while max/mean is 1.141, still 14% of extra capacity on the fullest node. A tenth of the spread is not a tenth of the imbalance, because max/mean has a floor of 1 that it approaches and never passes.
The 1/√V rate is stated on this page and measured in the lab, and the square roots printed beside the measurements are rounded — 1/√10 = 0.3162… is irrational, and the lab labels it as rounded where it prints it. Measurement and statement sit in adjacent columns on purpose: 0.3309 against 0.3162 is agreement to about five per cent on eight seeds, which is what a rate claim is entitled to, and it is not the same as an identity.
Example · What one token a node costs a real fleetAn eight-node ring at V = 1 gave a largest share of 28.29%. If that ring were serving 100 000 requests a second, the busiest node would take 28 290 /s against a fair 12 500 /s, so every node has to be built for well over twice its share or one of them saturates. At V = 100 the same fleet's worst node averages 1.141 times the mean, which is a 14% margin rather than a 126% one. The tokens did not change the number of machines; they changed how much of each machine is reachable.
What a token costs
Every token is a row in the ring that routers, clients and the membership protocol all carry, and the ownership lookup is over N · V entries rather than N. At N = 8 and V = 100 that is 800 rows, which is nothing; at N = 1 000 and V = 1 000 it is a million, which is a data structure with its own operational behaviour. The square-root rate is what makes this a real trade: since the next halving of the spread costs four times the tokens, there is always a point where buying evenness stops being worth the ring.
Two things this lesson does not change. Tokens do not affect what moves when a node joins — that is still the arcs the newcomer took, as in “Rehashing When N Changes”, and it is still roughly 1/(N+1) of the keys. And tokens do not help at all against a single key that is hot, because that key sits in exactly one arc however finely the ring is cut. “Hot Keys and Salting” is where that is priced.