0
0
Redisquery~10 mins

Failover manual process in Redis - Step-by-Step Execution

Choose your learning style9 modes available
Concept Flow - Failover manual process
Detect Master Failure
Promote Slave to Master
Update Clients to New Master
Reconfigure Other Slaves
Monitor New Master
END
This flow shows the steps to manually handle failover in Redis by detecting failure, promoting a slave, updating clients, reconfiguring slaves, and monitoring.
Execution Sample
Redis
1. Check master status
2. Promote slave with 'SLAVEOF NO ONE'
3. Point clients to new master
4. Reconfigure other slaves
5. Monitor new master health
This sequence manually switches Redis roles to recover from master failure.
Execution Table
StepActionCommand/OperationResult/State Change
1Detect Master FailurePing master or check logsMaster is unresponsive
2Promote Slave to MasterSLAVEOF NO ONE on slaveSlave becomes new master
3Update ClientsChange client config to new master IPClients connect to new master
4Reconfigure Other SlavesSLAVEOF new_master_ip on other slavesSlaves replicate new master
5Monitor New MasterRegular PING and logsEnsure new master is stable
6ENDManual failover completeSystem running with new master
💡 Manual failover ends after new master is stable and clients are updated
Variable Tracker
VariableStartAfter Step 1After Step 2After Step 3After Step 4Final
Master StatusResponsiveUnresponsiveN/AN/AN/AN/A
Slave RoleSlaveSlaveMasterMasterMasterMaster
Client ConnectionMaster IPMaster IPMaster IPNew Master IPNew Master IPNew Master IP
Other Slaves RoleSlaveSlaveSlaveSlaveSlave of new masterSlave of new master
Key Moments - 3 Insights
Why do we run 'SLAVEOF NO ONE' on the slave?
Running 'SLAVEOF NO ONE' stops the slave from replicating and promotes it to master, as shown in execution_table step 2.
Why must clients be updated after promoting the new master?
Clients need to connect to the new master IP to read/write data correctly, as shown in execution_table step 3.
What happens if other slaves are not reconfigured?
They will still replicate the old master, causing data inconsistency. Step 4 shows reconfiguration to replicate the new master.
Visual Quiz - 3 Questions
Test your understanding
Look at the execution_table, what command is used to promote a slave to master?
ASLAVEOF NO ONE
BSLAVEOF master_ip
CPING master
DCONFIG REWRITE
💡 Hint
Check step 2 in the execution_table where the slave is promoted.
At which step do clients start connecting to the new master?
AStep 1
BStep 3
CStep 2
DStep 4
💡 Hint
Look at the 'Update Clients' action in the execution_table.
If the master is still responsive, what happens to the failover process?
AClients update to new master
BFailover proceeds anyway
CFailover stops at step 1
DSlaves reconfigure
💡 Hint
Refer to the 'Detect Master Failure' step in execution_table and variable_tracker for Master Status.
Concept Snapshot
Failover manual process in Redis:
1. Detect master failure by pinging.
2. Promote a slave with 'SLAVEOF NO ONE'.
3. Update clients to new master IP.
4. Reconfigure other slaves to replicate new master.
5. Monitor new master health continuously.
Full Transcript
In Redis manual failover, first detect if the master is down by pinging or checking logs. If unresponsive, promote a slave to master by running 'SLAVEOF NO ONE' on it. Then update all clients to connect to this new master. Next, reconfigure other slaves to replicate from the new master. Finally, monitor the new master to ensure stability. This process ensures Redis continues working despite master failure.