Challenge - 5 Problems
Redis Replication Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediateWhat is the role of the Redis instance after this configuration?
Given the Redis configuration line:
What role will this Redis instance have after restart?
replicaof 192.168.1.100 6379What role will this Redis instance have after restart?
Attempts:
2 left
💡 Hint
The 'replicaof' directive sets the server role.
✗ Incorrect
The 'replicaof' configuration makes the Redis instance a replica of the specified master server, syncing data from it.
📝 Syntax
intermediateIdentify the correct syntax to configure a Redis replica
Which of the following lines correctly configures a Redis server to replicate from master at 10.0.0.5 port 6380?
Attempts:
2 left
💡 Hint
Use the modern directive for replication role.
✗ Incorrect
The correct syntax is 'replicaof '. 'slaveof' is deprecated but still works; others are invalid.
🧠 Conceptual
advancedWhat happens if the master Redis server goes down in a replication setup?
In a Redis replication setup, if the master server stops responding, what is the expected behavior of the replica servers?
Attempts:
2 left
💡 Hint
Think about read availability and data consistency.
✗ Incorrect
Replicas keep serving reads with existing data but cannot sync new writes until the master is back.
🔧 Debug
advancedWhy does this Redis replica fail to sync with the master?
Given the Redis replica configuration:
and the master server is running and reachable, but the replica logs show:
What is the most likely cause?
replicaof 192.168.1.50 6379and the master server is running and reachable, but the replica logs show:
Failed to connect to master: Connection refusedWhat is the most likely cause?
Attempts:
2 left
💡 Hint
Check master server's bind and firewall settings.
✗ Incorrect
If the master refuses connection, it often means it blocks the replica's IP or port via firewall or bind settings.
❓ optimization
expertHow to optimize Redis replication for minimal data loss during failover?
Which configuration or practice helps minimize data loss when a Redis master fails and replicas take over?
Attempts:
2 left
💡 Hint
Think about write safety and replication lag.
✗ Incorrect
Setting 'min-slaves-to-write' and 'min-slaves-max-lag' ensures the master waits for replicas to catch up before accepting writes, reducing data loss risk.
