0
0
Redisquery~20 mins

Read-only replicas in Redis - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Redis Replica Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
query_result
intermediate
2: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
AError: command not found
BOK
Cnil
DREADONLY You can't write against a read only replica.
Attempts:
2 left
💡 Hint
Think about what a read-only replica is designed to do.
🧠 Conceptual
intermediate
1:30remaining
Why use read-only replicas in Redis?
Which of the following is the main reason to use read-only replicas in Redis?
ATo increase write throughput by distributing writes
BTo provide high availability and distribute read load
CTo encrypt data automatically
DTo store backup data that is never accessed
Attempts:
2 left
💡 Hint
Think about how replicas help with scaling and availability.
📝 Syntax
advanced
2: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?
AREPLICAOF 192.168.1.10 6379
BSLAVEOF 192.168.1.10 6379
CMASTEROF 192.168.1.10 6379
DFOLLOW 192.168.1.10 6379
Attempts:
2 left
💡 Hint
The newer Redis versions use a different keyword than SLAVEOF.
optimization
advanced
2: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?
ASend all read and write requests to the master only
BSend all requests to a single replica to reduce network hops
CDistribute read requests evenly among replicas, write requests to master
DDisable replicas and use only the master for all operations
Attempts:
2 left
💡 Hint
Think about load balancing reads and writes.
🔧 Debug
expert
3: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?
ANetwork connectivity issues prevent replication
BThe master has disabled replication with the replica
CThe replica is in read-only mode and cannot replicate writes
DThe replica was started with the --slave-read-only no option
Attempts:
2 left
💡 Hint
Replication requires network communication between master and replica.