Challenge - 5 Problems
Redis Replication Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Purpose of the REPLICAOF command
What is the primary purpose of the REPLICAOF command in Redis?
Attempts:
2 left
💡 Hint
Think about how Redis handles data replication between servers.
✗ Incorrect
The REPLICAOF command tells a Redis server to become a replica of another Redis server, syncing data from the master.
❓ query_result
intermediate2:00remaining
Effect of REPLICAOF with no arguments
What is the result of running the command
REPLICAOF NO ONE on a Redis replica?Attempts:
2 left
💡 Hint
Consider what happens when a replica stops following a master.
✗ Incorrect
REPLICAOF NO ONE makes the Redis replica stop replicating and promotes it to a master role.
📝 Syntax
advanced2:00remaining
Correct syntax for making a Redis instance a replica
Which of the following commands correctly makes a Redis instance replicate from a master at IP 192.168.1.100 on port 6379?
Attempts:
2 left
💡 Hint
The command expects IP and port in order.
✗ Incorrect
The correct syntax is REPLICAOF followed by the master's IP address and port number.
❓ optimization
advanced2:00remaining
Optimizing failover with REPLICAOF
In a Redis setup with one master and multiple replicas, which approach using REPLICAOF helps minimize downtime during master failure?
Attempts:
2 left
💡 Hint
Think about how to quickly promote a replica and redirect others.
✗ Incorrect
Manually promoting a replica with REPLICAOF NO ONE and updating others reduces downtime by quickly establishing a new master.
🔧 Debug
expert2:00remaining
Identifying error in REPLICAOF usage
Given the command
REPLICAOF 192.168.1.50 executed on a Redis instance, what error will Redis return?Attempts:
2 left
💡 Hint
Check how many arguments REPLICAOF expects.
✗ Incorrect
REPLICAOF requires exactly two arguments: IP and port. Providing only one causes a wrong number of arguments error.