Complete the code to set a Redis instance as a replica of a master.
replicaof [1] [2]
The replicaof command requires the master host and port. Here, localhost 6379 correctly points to the master Redis instance.
Complete the command to check the role of a Redis instance.
info replication | grep [1]master or replica directly instead of the key.status.The info replication command shows replication info. Filtering by role shows if the instance is master or replica.
Fix the error in the command to promote a replica to master.
redis-cli [1]The correct command to promote a replica to master is replicaof no one with a space between 'no' and 'one'.
Fill both blanks to configure a replica to follow a master at IP 10.0.0.5 and port 6380.
replicaof [1] [2]
The replicaof command needs the master's IP and port. Here, the IP is 10.0.0.5 and the port is 6380.
Fill all three blanks to create a Redis configuration snippet that sets a replica to follow master at 192.168.0.10 port 6379 and disables replica read-only mode.
replicaof [1] [2] replica-read-only [3]
replica-read-only which keeps replica read-only.The replicaof command sets the master IP and port. Setting replica-read-only no allows writes on the replica.