Andreas Vöst
26 days
Claus-Theodor Riegg
4 years
Andreas Vöst
2 months
Andreas Vöst
2 months
Kim Klotz
3 months
Claus-Theodor Riegg
8 years
Andreas Vöst
5 months
Andreas Vöst
7 months
Claus-Theodor Riegg
8 years
Marc Dierig
9 months
Claus-Theodor Riegg
7 years

Redis Sentinel manual failover

Updated . Posted . Visible to the public. Repeats.

Hint

You're not able to control which redis replica will chosen for the failover.

  1. Connect to your sentinel instance:

    redis-cli -p <SENTINEL-PORT>
    
  2. Have a look at the configured masters, current master and the available replicas

    INFO sentinel
    
    SENTINEL master <master name>
    SENTINEL get-master-addr-by-name <master name> # IP and port only
    
    SENTINEL slaves <master name>
    
  3. Force a failover

    SENTINEL failover <master name> 
    
  4. After some seconds you can have a second look at the current master:

    SENTINEL get-master-addr-by-name <master name> 
    

    The IP should have changed.

Claus-Theodor Riegg
Last edit
Andreas Vöst
Keywords
ops
License
Source code in this card is licensed under the MIT License.