Challenge - 5 Problems
Redis Cluster Node Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate2:00remaining
What is the output of adding a new node to a Redis cluster?
You have a Redis cluster with 3 nodes. You run the command to add a new node to the cluster. What will the cluster nodes list show after adding the new node but before resharding?
Redis
redis-cli --cluster add-node 192.168.1.4:7004 192.168.1.1:7000 redis-cli --cluster nodes 192.168.1.1:7000
Attempts:
2 left
💡 Hint
Think about what happens immediately after adding a node before moving slots.
✗ Incorrect
When you add a new node to a Redis cluster, it joins the cluster but initially has no hash slots assigned. Slots must be manually resharded to the new node.
❓ query_result
intermediate2:00remaining
What happens when you remove a node that holds slots without resharding?
In a Redis cluster, you remove a node that currently holds hash slots without migrating its slots first. What will be the state of the cluster?
Redis
redis-cli --cluster del-node 192.168.1.2:7002 <node-id>
Attempts:
2 left
💡 Hint
Consider what happens to data when slots are suddenly missing.
✗ Incorrect
Removing a node that holds slots without migrating them causes the cluster to lose those slots, leading to an error state and inability to serve keys in those slots.
📝 Syntax
advanced2:00remaining
Which command correctly adds a node to a Redis cluster?
You want to add a new node at IP 10.0.0.5 port 7005 to an existing cluster with a node at 10.0.0.1 port 7000. Which command is syntactically correct?
Attempts:
2 left
💡 Hint
The syntax is: redis-cli --cluster add-node
✗ Incorrect
The correct syntax for adding a node is to specify the new node address first, then an existing cluster node address.
❓ optimization
advanced2:00remaining
Best practice to minimize downtime when removing a Redis cluster node
You want to remove a node from a Redis cluster with minimal downtime. Which approach is best?
Attempts:
2 left
💡 Hint
Think about how to keep data available during node removal.
✗ Incorrect
Migrating slots before removal ensures data is available on other nodes, preventing downtime.
🧠 Conceptual
expert2:00remaining
Why is it important to reshard slots after adding a new node to a Redis cluster?
After adding a new node to a Redis cluster, why must you reshard slots to the new node?
Attempts:
2 left
💡 Hint
Think about what happens if slots are unevenly distributed.
✗ Incorrect
Resharding distributes hash slots to the new node, balancing data and load across the cluster.