Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the command to create a Redis cluster with 3 nodes.
Redis
redis-cli --cluster create [1] Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using default Redis ports (6379) which are not cluster nodes.
Omitting the --cluster-replicas option.
Providing fewer than 3 nodes.
✗ Incorrect
The correct command includes the IP and ports of the 3 nodes and specifies zero replicas.
2fill in blank
mediumComplete the command to add a node to an existing Redis cluster.
Redis
redis-cli --cluster add-node [1] 127.0.0.1:7000
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using non-cluster ports like 6380.
Using localhost instead of IP:port format.
Adding a node that is already part of the cluster.
✗ Incorrect
You add the new node's IP and port, here 127.0.0.1:7002, to the cluster via an existing node.
3fill in blank
hardFix the error in the command to create a cluster with replicas.
Redis
redis-cli --cluster create 127.0.0.1:7000 127.0.0.1:7001 127.0.0.1:7002 [1] 1
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using incorrect option names like --cluster-replica or --replicas.
Omitting the option entirely.
Using a wrong number format.
✗ Incorrect
The correct option to specify replicas is --cluster-replicas followed by the number.
4fill in blank
hardFill both blanks to specify the cluster creation with 3 nodes and 1 replica each.
Redis
redis-cli --cluster create [1] --cluster-replicas [2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Listing only 3 nodes when replicas are specified.
Setting replicas to 3 instead of 1.
Using wrong IP:port formats.
✗ Incorrect
You need to list all 6 nodes (3 masters + 3 replicas) and set replicas to 1.
5fill in blank
hardFill all three blanks to create a cluster with 3 masters, 3 replicas, and assign replicas correctly.
Redis
redis-cli --cluster create [1] --cluster-replicas [2] --cluster-assign-replicas [3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting some nodes.
Setting replicas to 0 or more than 1.
Using 'false' for replica assignment.
✗ Incorrect
The command lists all nodes, sets replicas to 1, and enables automatic replica assignment.