What is the hot-key (celebrity) problem, and how do you solve it?
Reviewed by Gurusankar M.
β‘ Short Answer
One key gets disproportionate traffic (a viral post, a popular product), overwhelming its single shard/cache node despite good overall partitioning. Solutions: replicate the hot key across nodes, add a client-side/local cache in front, shard the key with a suffix, or precompute/serve it from a CDN.
βCoffee Chat Question
Concept Made Simple
βWhat is the hot-key (celebrity) problem, and how do you solve it?β
π§ Mind Map Answer
Remember It Faster
π₯What If?
Think Beyond the Expected
Consistent hashing spreads keys evenly β why doesn't it fix a single hot key?
Consistent hashing balances DIFFERENT keys across nodes, but ALL requests for one specific key still hash to the SAME node β so a single super-popular key concentrates load on one node regardless. You need per-key remedies: replication, local caching, or key-sharding, not just good partitioning.
πReal World
Hot keys (celebrity accounts, flash-sale products, viral content) are a recurring scaling problem; the fixes β replicate/local-cache reads, shard hot writes, CDN static hot content β appear across feed, cache, and DB designs.
π―Interviewer's Expectation
Keywords they're listening for:
β οΈCommon Mistakes
- βAssuming consistent hashing solves hot keys
- βNo detection/mitigation for viral content
- βSame fix for read vs write hotspots
β Best Practices
- βReplicate/local-cache hot read keys
- βShard hot write keys with a suffix
- βDetect hotspots and serve static ones via CDN
πFollow-up Questions
- 1How do you detect a hot key at runtime?
- 2Read hot key vs write hot key β different fixes?
- 3How does this show up in a news feed design?
π§©Related Technologies
Continue Learning with AI
Take this question deeper with your favourite AI assistant. Pick a depth, copy the prompt, or open it directly β AI is your learning companion, not a shortcut.
Plain-language foundations
I'm preparing for a software engineering interview and want to understand this from scratch, as a beginner. Topic: Scaling (System Design) Interview question: "What is the hot-key (celebrity) problem, and how do you solve it?" Please: 1. Explain the core idea in simple, plain language, using an everyday analogy. 2. Define any technical terms you use. 3. Walk through one small, concrete example. 4. Finish with a single sentence I can easily remember. Keep the tone friendly and assume I'm new to this topic.
Was this answer helpful?
β Featured Products
Support our platform by exploring our recommended products.
As an Amazon affiliate, purchases through these links may earn us a small commission β at no extra cost to you. It helps keep Full Stack Interview Guru free.