0
0
Redisquery~10 mins

Failover manual process in Redis - Interactive Code Practice

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

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

Redis
redis-cli [1]
Drag options to blanks, or click blank then click option'
AINFO replication
BPING
CSET key value
DGET key
Attempts:
3 left
💡 Hint
Common Mistakes
Using PING does not show role information.
GET or SET commands do not provide replication info.
2fill in blank
medium

Complete the command to promote a slave to master by making it writable.

Redis
redis-cli [1]
Drag options to blanks, or click blank then click option'
ACONFIG SET slave-read-only no
BCONFIG SET slave-read-only yes
CSLAVEOF no one
DSLAVEOF master 6379
Attempts:
3 left
💡 Hint
Common Mistakes
Using SLAVEOF with a master address keeps the instance as a slave.
CONFIG SET slave-read-only no only changes read-only mode but does not promote.
3fill in blank
hard

Fix the error in the command to make the current master a slave of the new 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'
ASLAVE
BSLAVEOF
CMASTEROF
DREPLICAOF
Attempts:
3 left
💡 Hint
Common Mistakes
Using SLAVE or MASTEROF commands which do not exist.
Using REPLICAOF in older Redis versions.
4fill in blank
hard

Fill both blanks to check the replication offset and connected slaves count.

Redis
redis-cli [1] | grep [2]
Drag options to blanks, or click blank then click option'
AINFO replication
BINFO server
Cconnected_slaves
Drole
Attempts:
3 left
💡 Hint
Common Mistakes
Using INFO server does not show replication details.
Filtering by role does not show slave count.
5fill in blank
hard

Fill all three blanks to reset the old master as a slave of the new master at 10.0.0.5 port 6380 and make it read-only.

Redis
redis-cli [1] 10.0.0.5 [2] && redis-cli [3] slave-read-only yes
Drag options to blanks, or click blank then click option'
ASLAVEOF
B6380
CCONFIG SET
Attempts:
3 left
💡 Hint
Common Mistakes
Using SLAVEOF instead of SLAVEOF.
Forgetting to set slave-read-only to yes.