FUNDAMENTALS & NETWORKING · SUBTOPIC
Virtual Nodes & Hot-Spot Mitigation
Eliminate uneven slices and handle celebrity hot keys cleanly.
IntermediatePart of Consistent Hashing
Subtopics in Consistent Hashing (2)
In plain words
If only 3 server pins sit on a clock face, one might end up guarding half the clock! Giving each server 150 tiny pins spread around the clock keeps every slice fair.
Think of it like…
Giving every pizza slice lover 10 small bites scattered around the pie instead of 1 random cut.
Loading interactive diagram
Loading interactive exercise
Theory & how it works
What vnodes do NOT solve: single hot keys
Virtual nodes distribute the *number of keys* evenly, but if 1 single key (celebrity_post_99) gets 50% of all traffic, whichever single node owns that key still melts.
Fix single hot keys by adding a random suffix (celebrity_post_99#0..9) across 10 shards, or caching that ultra-hot key in an in-process local cache on app servers for a few seconds.
Key points & practical guide
Summary checklist
- Use 100–200 virtual nodes per physical server
- When a node dies, vnodes spread re-loads across the entire cluster
- Mitigate single hot keys with key salting or local L1 caching
When to use it
- Any consistent-hashing ring in production
Watch out for
- Too many vnodes (>10,000 per node) bloats ring metadata; 100–200 is the sweet spot
Quick check
Loading quiz