3
votes

I've been reading about the use of Redis sentinel for failover. I plan to have 1 master + 1 slave, and turn the slave into a master if the master goes down for more than 1 minute. I know this is 100% possible with Sentinel.

However, I've seen documentation mention the use of multiple Sentinels. Let's assume this is not possible (ie. budget or technical constraints). I assume I can have this configuration:

  • 1 Sentinel in Server A
  • Master in Server B
  • Slave in Server C

What's the benefit of having multiple sentinels as opposed to 1? My app can only connect to 1 sentinel at a time, and even if there were 2 sentinels, my app can't rotate or switch between either of them if one goes down w/o some complicated logic in my app layer.

1
Sentinels are in charge of making sure your Master is available and failing over to a slave in case of failure. By having just one sentinel, you'll have a single point of failure in your set up - if that sentinel fails, you're left with no HA.Itamar Haber
The benefit of running 3+ sentinels is that it will properly manage failover for you. This is essentially answered in your other, near-duplicate, question: stackoverflow.com/questions/28323936/…The Real Bill
What stack are you running?Brian Noah
1 sentinel is another single point of failure, I supposeAlexander Mills
how can I run sentinel(only sentinel) in separate server?? @HenleyAATHITH RAJENDRAN

1 Answers

0
votes

This configuration is possible only if servers in different locations. In that case, it hasn't SPOF, because of very low chances that 2 servers failed at the same time. If Sentinel failed, you can quickly notice it and repair/start new with Ansible.

This configuration worked for me 2 years, HA and FO worked perfectly.