Challenge - 5 Problems
Redis Cluster Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate2:00remaining
What is the output of this Redis cluster command?
Consider a Redis cluster with 3 nodes. You run the command
CLUSTER NODES. What kind of information does this command return?Redis
CLUSTER NODES
Attempts:
2 left
💡 Hint
Think about what information is needed to understand the cluster topology.
✗ Incorrect
The
CLUSTER NODES command returns detailed info about all nodes in the cluster, including their IDs, IPs, roles (master/slave), and the slots they serve.🧠 Conceptual
intermediate2:00remaining
How does client-side cluster support handle key distribution?
In Redis client-side cluster support, how does the client decide which node to send a command to for a given key?
Attempts:
2 left
💡 Hint
Think about how the cluster divides keys among nodes.
✗ Incorrect
Client-side cluster support uses a hash function to compute the slot for a key and sends commands directly to the node responsible for that slot, avoiding redirections.
📝 Syntax
advanced2:00remaining
Which Redis command syntax correctly requests a slot migration in a cluster?
You want to migrate slot 1000 from one node to another in a Redis cluster. Which command syntax is correct?
Attempts:
2 left
💡 Hint
Check the official Redis cluster command format for SETSLOT.
✗ Incorrect
The correct syntax is
CLUSTER SETSLOT <slot> MIGRATING <node-id> to mark a slot as migrating.❓ optimization
advanced2:00remaining
How can client-side cluster support reduce redirections during key access?
Which approach best reduces the number of redirections a Redis client experiences when accessing keys in a cluster?
Attempts:
2 left
💡 Hint
Think about how clients can remember cluster topology to avoid unnecessary redirects.
✗ Incorrect
Caching the slots mapping locally allows the client to send commands directly to the right node, reducing redirections.
🔧 Debug
expert2:00remaining
Why does this Redis cluster client command cause a MOVED error?
A client sends the command
GET user:123 to a Redis cluster node but receives a MOVED error pointing to another node. What is the most likely cause?Redis
GET user:123Attempts:
2 left
💡 Hint
Consider what MOVED errors indicate in Redis cluster communication.
✗ Incorrect
A MOVED error means the client sent the command to a node that no longer owns the slot for the key, usually due to outdated slot cache.