Interview's MateSystem Design
Interview's Mate

System Design

Architecture & trade-offs

Visualizer

DSA Visualizer
All 32 lessons
Custom Playground
Try your own examples

Learning

System Design
31 architecture topics
SQL Learning
160 foundations → production topics
AI Engineering
160 LLM → backend topics
Data Science
160 Python → MLOps topics
Data Engineer
160 SQL → streaming topics
Docker
160 Docker learning topics
Kubernetes
160 K8s fundamentals → cloud
Java LearnSoon
Coming soon
Python Learn
Interview Q&A & internals
JavaScript Learn
Closures, async & DOM Q&A
Tech Learn
Search, practise & track Q&A
AI DSA Practice
Solve coding problems
Theme
Home
All topics/Consistent Hashing
FUNDAMENTALS & NETWORKING · SUBTOPIC

Virtual Nodes & Hot-Spot Mitigation

Eliminate uneven slices and handle celebrity hot keys cleanly.

IntermediatePart of Consistent Hashing
Practice in AI HLD
Subtopics in Consistent Hashing (2)
OverviewModulo vs. RingVirtual Nodes

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
Previous subtopic
Modulo Hashing vs. Consistent Hashing
Back to overview
Full Consistent Hashing Lesson