I have a 3-nodes Redis replication and a 3-nodes Sentinel. I want to remove one slave.

I tried stop slave and remove slaveof 6379 from configuration. But it became slave again after I started it. And slaveof was back again in config.

After reading SLAVEOF, I tried invoking SLAVEOF NO ONE. But it became slave again after 1 min.

I guess Sentinel reconfig it to slave. How can I remove one slave in my case where Sentinel exists?

| improve this question | | | | |

I should read sentinel doc carefully. It's mentioned in sections Adding or removing Sentinels and Removing the old master or unreachable slaves.

These are steps:

  • Shut down the redis slave to be removed.
  • Remove slaveof statement from conf

    # Generated by CONFIG REWRITE
    slaveof 6379
  • Send a SENTINEL RESET mastername command to all Sentinel instances. One after the other, waiting at least 30 seconds between instances.

Now the redis slave is standalone, and sentinels forget this slave.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.