Recall & Review
beginner
What does the
REPLICAOF command do in Redis?It makes the current Redis server a replica of another Redis server by specifying the master server's IP and port.
Click to reveal answer
beginner
How do you stop a Redis server from being a replica using
REPLICAOF?Use
REPLICAOF NO ONE to make the Redis server stop replicating and become a master again.Click to reveal answer
beginner
Syntax of the
REPLICAOF command?REPLICAOF <masterip> <masterport>or
REPLICAOF NO ONEto stop replication.
Click to reveal answer
intermediate
What happens to the data on a Redis server when you run
REPLICAOF <masterip> <masterport>?The server clears its current data and starts syncing data from the specified master server.
Click to reveal answer
intermediate
Can a Redis server be a replica of multiple masters at the same time using
REPLICAOF?No, a Redis server can only replicate from one master at a time.
Click to reveal answer
What command makes a Redis server stop replicating and become a master again?
✗ Incorrect
The command
REPLICAOF NO ONE stops replication and makes the server a master.What does the
REPLICAOF command require as arguments?✗ Incorrect
REPLICAOF needs the master server's IP address and port number.If you run
REPLICAOF 192.168.1.10 6379, what happens?✗ Incorrect
This command makes the server replicate data from the specified master.
Can a Redis server replicate from two masters at the same time?
✗ Incorrect
Redis supports replication from only one master per replica server.
Which Redis command was previously used instead of
REPLICAOF?✗ Incorrect
SLAVEOF was the old name for REPLICAOF.Explain how the
REPLICAOF command is used to set up replication in Redis.Think about how a server becomes a replica and how it can stop replicating.
You got /4 concepts.
Describe what happens internally when a Redis server runs
REPLICAOF <masterip> <masterport>.Consider the data and role changes on the server.
You got /3 concepts.