3

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.

Henley
  • 21,258
  • 32
  • 119
  • 207
  • 2
    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 Feb 04 '15 at 08:51
  • 1
    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: http://stackoverflow.com/questions/28323936/redis-sentinels-in-same-servers-as-master-slave – The Real Bill Feb 04 '15 at 22:59
  • What stack are you running? – Brian Noah Feb 11 '15 at 22:09
  • 1 sentinel is another single point of failure, I suppose – Alexander Mills Jul 06 '15 at 21:15
  • how can I run sentinel(only sentinel) in separate server?? @Henley – AATHITH RAJENDRAN May 25 '19 at 08:56

1 Answers1

0

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.

AATHITH RAJENDRAN
  • 4,689
  • 8
  • 34
  • 58
c ccx
  • 46
  • 1
  • 10