HardπŸ‘€ 8-15 years 1 min read

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

Reviewed by Gurusankar M.

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

Problemβ†’one key ≫ traffic β†’ single-node overload
Replicate→copy hot key to many nodes
Local cache→cache in front of the shard
Shard/suffix→split 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 loadβœ“ hashing doesn't help one keyβœ“ replicate/local cache readsβœ“ shard hot writesβœ“ CDN 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.

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