0
0
Redisquery~10 mins

Read-only replicas in Redis - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to connect to a Redis read-only replica.

Redis
redis-cli -h [1] -p 6379 --readonly
Drag options to blanks, or click blank then click option'
A127.0.0.1
Blocalhost
Creplica.redis.server
Dmaster.redis.server
Attempts:
3 left
💡 Hint
Common Mistakes
Using the master server hostname instead of the replica.
Using localhost which usually points to the master.
2fill in blank
medium

Complete the command to check the role of the connected Redis instance.

Redis
redis-cli INFO [1]
Drag options to blanks, or click blank then click option'
Areplication
Bserver
Cmemory
Dclients
Attempts:
3 left
💡 Hint
Common Mistakes
Using INFO server which shows general info, not replication role.
Using INFO memory which shows memory usage.
3fill in blank
hard

Fix the error in the command to make the replica read-only.

Redis
redis-cli CONFIG SET [1] [2]
Drag options to blanks, or click blank then click option'
Aslave-read-only
Breplica-read-only
Cread-only
Dyes
Attempts:
3 left
💡 Hint
Common Mistakes
Using the old config name 'slave-read-only'.
Using 'no' instead of 'yes' for enabling read-only.
4fill in blank
hard

Fill in the blank to create a Redis replica of a master at 192.168.1.10 port 6379.

Redis
redis-cli [1] 192.168.1.10 6379
Drag options to blanks, or click blank then click option'
A-h
BSLAVEOF
C-p
DREPLICAOF
Attempts:
3 left
💡 Hint
Common Mistakes
Using the deprecated 'SLAVEOF' command.
Using connection flags like -p or -h.
5fill in blank
hard

Fill all three blanks to configure a Redis replica with password authentication.

Redis
redis-cli -h [1] -p [2] -a [3] --readonly
Drag options to blanks, or click blank then click option'
Areplica.redis.local
B6380
CreplicaPass123
Dmaster.redis.local
Attempts:
3 left
💡 Hint
Common Mistakes
Using the master host instead of the replica.
Using the default port 6379 instead of the replica port.
Forgetting to add the password.