cluster failover
CLUSTER
CLUSTER FAILOVER [FORCE|TAKEOVER]
This command, that can only be send to a Redis Cluster slave node, forces the slave to start a manual failover of its master instance.
A manual failover is a special kind of failover that is usually executed when there are no actual failures, but we wish to swap the current master with one of its slaves (which is the node we send the command to), in a safe way, without any window for data loss. It works in the following way:
- The slave tells the master to stop processing queries from clients.
- The master replies to the slave with the current replication offset.
- The slave waits for the replication offset to match on its side, to make sure it processed all the data from the master before it continues.
- The slave starts a failover, ob