Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to get the cluster nodes information.
Redis
redis-cli [1] nodes Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'info' instead of 'cluster' will show general info, not cluster nodes.
Using 'get' or 'list' are not valid Redis CLI commands for cluster nodes.
✗ Incorrect
The cluster nodes command shows the cluster nodes information in Redis.
2fill in blank
mediumComplete the code to add a node to the Redis cluster.
Redis
redis-cli --cluster [1] 127.0.0.1:7003 127.0.0.1:7000
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'create' is for creating a new cluster, not adding nodes.
Using 'join' or 'connect' are not valid Redis cluster commands.
✗ Incorrect
The --cluster add-node option is used to add a new node to an existing Redis cluster.
3fill in blank
hardFix the error in the command to reshard slots in the cluster.
Redis
redis-cli --cluster [1] 127.0.0.1:7000
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'rebalance' or 'resync' are not valid Redis cluster commands.
Using 'migrate' is a different command for key migration, not cluster resharding.
✗ Incorrect
The correct command to move slots between nodes is --cluster reshard.
4fill in blank
hardFill both blanks to check the cluster's slot allocation and node status.
Redis
redis-cli [1] cluster [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'nodes' or 'status' after 'info cluster' will cause errors or unexpected output.
Using 'nodes slots' is not a valid command sequence.
✗ Incorrect
The command redis-cli info cluster slots shows slot allocation and cluster info.
5fill in blank
hardFill all three blanks to create a Redis cluster with 3 nodes and 1 replica each.
Redis
redis-cli --cluster create [1] [2] [3] --cluster-replicas 1
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Including port 7003 is extra and not needed for this 3-node cluster.
Using fewer than three nodes will cause the cluster creation to fail.
✗ Incorrect
The command creates a cluster with nodes at ports 7000, 7001, and 7002, each having one replica.