Challenge - 5 Problems
Redis Replica Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ query_result
intermediate2:00remaining
What is the output of this Redis command on a read-only replica?
Consider a Redis read-only replica. What will be the result of running the command
SET key1 value1 on this replica?Redis
SET key1 value1
Attempts:
2 left
💡 Hint
Think about what a read-only replica is designed to do.
✗ Incorrect
A read-only replica in Redis does not allow write commands like SET. It returns an error message indicating the command is not allowed.
🧠 Conceptual
intermediate1:30remaining
Why use read-only replicas in Redis?
Which of the following is the main reason to use read-only replicas in Redis?
Attempts:
2 left
💡 Hint
Think about how replicas help with scaling and availability.
✗ Incorrect
Read-only replicas help by allowing many clients to read data without overloading the main server, improving availability and read performance.
📝 Syntax
advanced2:00remaining
Which command correctly configures a Redis instance as a read-only replica?
You want to configure a Redis server as a read-only replica of a master at IP 192.168.1.10 port 6379. Which command should you run on the replica?
Attempts:
2 left
💡 Hint
The newer Redis versions use a different keyword than SLAVEOF.
✗ Incorrect
The correct command to configure a replica is REPLICAOF. SLAVEOF is deprecated but still works in older versions.
❓ optimization
advanced2:00remaining
How to optimize read performance using Redis replicas?
You have a Redis master and multiple read-only replicas. Which approach best optimizes read performance for many clients?
Attempts:
2 left
💡 Hint
Think about load balancing reads and writes.
✗ Incorrect
Distributing read requests among replicas reduces load on the master and improves read throughput.
🔧 Debug
expert3:00remaining
Why does this Redis replica not replicate writes from master?
A Redis replica is configured with
REPLICAOF 10.0.0.1 6379. However, writes made on the master do not appear on the replica. What is the most likely cause?Attempts:
2 left
💡 Hint
Replication requires network communication between master and replica.
✗ Incorrect
If writes do not appear on the replica, network issues are the most common cause preventing replication.