Read more

Redis Sentinel manual failover

Avatar
Claus-Theodor Riegg
August 16, 2016Software engineer at makandra GmbH

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.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show archive.org snapshot
Posted by Claus-Theodor Riegg to makandra Operations (2016-08-16 11:02)