0
0
Redisquery~20 mins

Cluster architecture in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis Cluster Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
2:00remaining
What is the output of the command CLUSTER INFO in Redis Cluster?
You run the Redis command CLUSTER INFO on a node in a Redis Cluster. What kind of information does this command return?
AIt returns the cluster state, number of slots assigned, number of known nodes, and cluster size.
BIt returns the list of all keys stored in the cluster.
CIt returns the memory usage of the Redis server.
DIt returns the current connected clients and their IP addresses.
Attempts:
2 left
💡 Hint
Think about what general cluster status information you might want to check.
🧠 Conceptual
intermediate
2:00remaining
How does Redis Cluster handle key distribution?
In Redis Cluster, how are keys distributed across different nodes?
AKeys are stored on all nodes simultaneously for redundancy.
BKeys are assigned randomly to any node without hashing.
CKeys are assigned to nodes based on hashing the key into one of 16384 slots, which are distributed among nodes.
DKeys are stored only on the master node and replicas do not hold keys.
Attempts:
2 left
💡 Hint
Think about how consistent hashing or slot assignment works in distributed systems.
📝 Syntax
advanced
2:00remaining
Which command correctly adds a new node to an existing Redis Cluster?
You want to add a new node to your Redis Cluster. Which command syntax is correct for this operation?
Aredis-cli --cluster create <new_node_ip>:<port>
Bredis-cli --cluster add-node <new_node_ip>:<port> <existing_node_ip>:<port>
Credis-cli --cluster join <new_node_ip>:<port> <existing_node_ip>:<port>
Dredis-cli --cluster insert <new_node_ip>:<port> <existing_node_ip>:<port>
Attempts:
2 left
💡 Hint
Look for the official command to add a node to a cluster.
optimization
advanced
2:00remaining
How can you optimize Redis Cluster to handle failover smoothly?
Which configuration or setup helps Redis Cluster handle failover smoothly without data loss?
AManually restart nodes when a failure occurs.
BDisable replicas to reduce network traffic.
CUse a single master node with no replicas for simplicity.
DAssign replicas to each master node so replicas can take over if a master fails.
Attempts:
2 left
💡 Hint
Think about how redundancy helps in failover scenarios.
🔧 Debug
expert
2:00remaining
What error occurs if you try to run a multi-key command on keys located in different Redis Cluster slots?
You run the command MGET key1 key2 where key1 and key2 hash to different slots in a Redis Cluster. What error will Redis return?
ACROSSSLOT Keys in request don't hash to the same slot
BWRONGTYPE Operation against a key holding the wrong kind of value
COOM command not allowed when used memory > 'maxmemory'.
DNOSCRIPT No matching script. Please use EVAL.
Attempts:
2 left
💡 Hint
Think about Redis Cluster's slot-based key distribution and multi-key command restrictions.