Cluster (Problems)

ProblemDescriptionSolution
Cross-slot operations
  • MGET requires all keys in one slot
  • Transactions require all keys in one slot
  • Lua scripts with multiple keys require all keys in one slot
  • Use one stable entity ID in the hash tag, such as user:{42}:name and user:{42}:email
  • Split unrelated keys by slot
Hash tagsOne shared tag for unrelated data sends it all to one slot.
  • Use a different stable tag per user
  • Use a different stable tag per order
  • Use a different stable tag per tenant or other grouping boundary
Hot keysOne heavily accessed key concentrates load on its owning master.
  • Split data across keys and slots
  • Cache read-heavy values in the application
Resharding
  • ASK redirects
  • TRYAGAIN responses
  • Higher latency during slot migration
  • Retry with backoff and jitter
  • Move slots in smaller batches outside peak traffic
Manual slot balancingRedis retains current slot ownership until an explicit resharding operation.Monitor every master and move slots manually after measuring CPU, memory, and traffic.
Uneven loadKey size and access distribution can produce unequal CPU or memory use despite equal slot counts.
  • Move hot slots
  • Change the key layout
  • Add capacity
  • Compare load per master
Per-node commandsSCAN and DBSIZE return the connected master's view.Run them on every master and aggregate the results.
Connection fan-out
  • Connections can fan out to all nodes
  • Eager pools, lazy connections and replica reads depend on the client
  • Bound client pools
  • Count connections per node
  • Applications × per-node pool size estimates that node's pooled connections
Reconnect stormFailover can make clients refresh topology and reconnect concurrently.Use exponential backoff with jitter and cap concurrent reconnects.
Master removalRemoval requires the master to own zero slots.Reshard all its slots to other masters before removing the node.
Uncovered slotsWith default full coverage, a slot without an owner stops the entire cluster.Restore its master or replica and recover full slot coverage.
Master quorum loss
  • Failover authorization requires a majority of masters
  • Losing the majority stops promotion
Distribute at least three masters across failure domains and restore the majority.