How does Redis Cluster distribute keys across nodes?
Hash slots: Redis Cluster computes CRC16(key) % 16384 to find the slot. Each master owns a contiguous range of slots. Rebalancing moves slot ownership and the associated keys.
2 / 5
What is a hash tag in Redis Cluster?
Hash tag: only the content inside {} is hashed, so user:{1}:profile and user:{1}:cart land on the same slot and can be used together in MGET or transactions.
3 / 5
What happens during a Redis Cluster failover?
Failover: when a master is unreachable for cluster-node-timeout, its replicas initiate an election. The replica with the most up-to-date replication offset wins and becomes the new master for those slots.
4 / 5
What does a MOVED redirect response mean?
MOVED: a cluster-aware client sent a command to the wrong node. The response includes the correct node address. Smart clients update their slot map and retry, making the redirect transparent.
5 / 5
What limitation does Redis Cluster impose on multi-key commands?
Cross-slot restriction: commands like MSET, SUNION, or EVAL accessing keys in different slots fail with a CROSSSLOT error. Use hash tags or redesign the data model to keep related keys co-located.