STANDARDwalkthrough

Virtual Nodes

2 of 8
3 related
Three physical servers on a ring produce three arcs. Random hash placement makes arc lengths wildly uneven: one server might own 60% of the ring while another owns 10%.
The fix: each physical server places 256 virtual positions (vnodes) on the ring. With 100 servers x 256 vnodes = 25,600 positions, the law of large numbers kicks in and arc lengths converge.
Measured load variance with 3 nodes is roughly 250%.
Load variance drops from 250% to under 10%. Why 256?
Fewer vnodes (32) still leave 30% variance. More (1024) quadruple the ring size with diminishing returns.
DynamoDB uses 256 as its default. Ring metadata: each vnode is a (hash, node_id) pair at ~12 bytes.
Total: 25,600×12B=307 KB25{,}600 \times 12B = 307\text{ KB}, fitting in L2 cache. Lookup: O(log25,600)15O(\log 25{,}600) \approx 15 comparisons.
Trade-off: vnodes complicate rebalancing since a joining node claims positions from multiple donors.
Why it matters in interviews
This is the KEY INSIGHT of the topic. Interviewers want to know if you understand why naive rings fail (250% variance) and how vnodes fix it. Deriving 307 KB of ring metadata proves you reason about the data structure.
Related concepts