Challenge - 5 Problems
Redis Master-Replica Expert
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate2:00remaining
What is the output of the command
INFO replication on a Redis replica?You run
INFO replication on a Redis replica node. What key information will you see in the output?Redis
INFO replication
Attempts:
2 left
💡 Hint
Think about what role a replica plays and what info it reports about its master.
✗ Incorrect
A Redis replica reports its role as 'replica' (or 'slave' in older versions), shows the master's IP, and the link status to the master. Masters report connected slaves, sentinels report monitored masters, and clients report connected clients.
🧠 Conceptual
intermediate1:30remaining
Why does a Redis replica not accept write commands by default?
In a master-replica setup, why are write commands disabled on replicas by default?
Attempts:
2 left
💡 Hint
Consider the role of master and replica in data consistency.
✗ Incorrect
Writes are allowed only on the master to keep data consistent. Replicas replicate data from the master and do not accept writes to avoid conflicts.
📝 Syntax
advanced1:30remaining
Which Redis command correctly promotes a replica to master?
You want to promote a Redis replica to become a master. Which command will do this correctly?
Attempts:
2 left
💡 Hint
The command changed name in recent Redis versions.
✗ Incorrect
The command to promote a replica to master is 'REPLICAOF NO ONE' in modern Redis versions. 'SLAVEOF' is deprecated but still works in older versions. The other commands do not exist.
❓ optimization
advanced2:00remaining
How can you reduce replication lag in a Redis master-replica setup?
Which approach helps reduce replication lag between master and replica in Redis?
Attempts:
2 left
💡 Hint
Think about how data is transferred from master to replica.
✗ Incorrect
Diskless replication sends data directly over the network without writing to disk first, reducing lag. Increasing replicas doesn't reduce lag per replica. Disabling AOF affects persistence, not replication lag. Redis replication is asynchronous; synchronous mode is not supported.
🔧 Debug
expert2:30remaining
Why does a Redis replica show
master_link_status:down after network recovery?After a network outage, your Redis replica shows
master_link_status:down even though the network is restored. What is the most likely cause?Attempts:
2 left
💡 Hint
Consider what happens to replication state after network failures.
✗ Incorrect
If the replication backlog is lost during outage, the replica cannot catch up incrementally and must perform a full resync, causing the link to stay down until resync completes. Master crash or IP change would cause different symptoms. Replica configured as master would not show master link status.