Hard👤 8-15 years 1 min read

What is the hot-key (celebrity) problem, and how do you solve it?

Asked inAmazonGoogleMicrosoft
#hot key#celebrity problem#skew#caching#sharding
Report issue

⚡ 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

Problemone key ≫ traffic → single-node overload
Replicatecopy hot key to many nodes
Local cachecache in front of the shard
Shard/suffixsplit a hot write key

🔥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:

skewed single-key loadhashing doesn't help one keyreplicate/local cache readsshard hot writesCDN for static hot content

⚠️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

Redis replicasclient-side cacheCDNkey sharding

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.
Open inChatGPTGeminiClaude

Was this answer helpful?

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.

Related Questions