Suppose I have [Slave IP Address] which is the slave of [Master IP Address].
Now my master server has been shut down, and I need to set this slave to be master MANUALLY (WITHOUT using sentinel automatic failover, WITH redis command).
Is it possible doing this without restarting the redis service ? (and losing all the cached data)
The Redis replication uses an asynchronous method to transfer data from master to slave. The slave periodically acknowledges the received data sent by the master node, and also the master node can have many slaves. Redis can support cascading replication, so the slave can be connected to another slave.
Launch Sentinel To restart the Redis service, run this command: sudo service redis restart . To start Redis in Sentinel mode, run redis-server /etc/redis/sentinel. conf –sentinel .
Automatic Failover A Redis Enterprise cluster provides fault tolerance and resilience. In the case of a primary server or node outage, Redis Enterprise's self-healing process automatically detects the hardware failure, elects a replica as a replacement, and promotes that replica to become the new primary server.
use SLAVEOF NO ONE
to promote a slave to master
http://redis.io/commands/slaveof
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With