Skip to main content
InterviewHubPRO
Section Overview
Q30

Question 30 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

60%
Redis & Caching (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

How does Redis handle Big Keys and Hot Keys?

senior LevelredisAdvanced Internals

In Simple Words:

  • Big Key: A single key containing millions of items (e.g. a List with 5 million entries). Deleting it with DEL blocks the event loop for seconds!
    • Fix: Detect with redis-cli --bigkeys. Use UNLINK (asynchronous background deletion) instead of DEL.
  • Hot Key: A single key receiving 100,000 QPS, exhausting a single node's network interface.
    • Fix: Multi-level caching (client-side memory cache), or key sharding (replicate hot_key to hot_key_1, hot_key_2 across cluster nodes).