Skip to main content
InterviewHubPRO
Section Overview
Q22

Question 22 of 50

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

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

What are Hash Tags in Redis Cluster and why are they necessary for multi-key commands?

senior LevelredisAdvanced Internals

In Simple Words: In Redis Cluster, multi-key commands (MGET, MSET, transactions) fail if the keys live on different cluster nodes:

  • Hash Tags {...}: Force Redis to hash only the text inside curly braces:
    • user:{101}:profile and user:{101}:orders will hash strictly on {101}.
  • Guarantees both keys map to the exact same hash slot and physical node, allowing atomic transactions and multi-key queries!