Redis 2.8 => 2 nodes configuration

56 views
Skip to first unread message

Gaetan

unread,
May 19, 2015, 4:53:13 AM5/19/15
to redi...@googlegroups.com
Hello,

I'm curently trying to installed 2 node of Redis 2.8, with Master Slave configuration, and sentinel...

Server RE01 : Sentinel + Master server
Server RE02 : Sentinel + Slave server

When server is down, Sentinel automtiquely failover redis server, but, if OS crash (Sentinel + server down), the second sentinel don't want to put RE02 server as master (Quorum = 1)...

Is it normal ? A 2 sentinels  architecture is supported ?

If this architecture is possible, I will posted  our configuration...

Thank you !

Jan-Erik Rediger

unread,
May 19, 2015, 5:04:09 AM5/19/15
to redi...@googlegroups.com
It's not possible. For a proper quorum you need N/2 + 1 nodes to vote
for a new master. With N = 2, you still need 2 votes.
Therefore you need atleast 3 Sentinels to avoid the mentioned problem.
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.

Carlos Abalde

unread,
May 19, 2015, 10:22:09 AM5/19/15
to redi...@googlegroups.com
Hi,

Maybe I'm missing something here, but I think that technically speaking the architecture is supported simply setting the quorum value to 1 in sentinel.conf. Isn't it? A different discussion is if that's a reasonable idea. I think the answer to that question depends a lot on the specific scenario.

Cheers,

--
Carlos Abalde

Salvatore Sanfilippo

unread,
May 19, 2015, 10:39:17 AM5/19/15
to Redis DB
Hello, I'm in the process of improving the Sentinel configuration to
make certain things simpler, but if you check the current config, it
is already well-stated that you need the majority of Sentinels to
authorize a failover. Quorum is used for the failure detection, so
this is how it works:

Step 1) Failure detection: is quorum reached to consider the master
failing? If so, go to step 2.
Step 2) Is there the majority to authorize a failover? If so,
failover, otherwise do nothing.

Otherwise in your proposed setup, if the two servers where you have,
in each, a Sentinel+Redis server combo would no longer able to talk
with the other side, what you get is two masters since the minority
side is able to elect the slave to master. Moreover the majority is
needed in order to create an unique configuration number that is later
used in order to propagate the latest configuration for a given master
(who is the active master).

Salvatore
> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to redis-db+u...@googlegroups.com.
> To post to this group, send email to redi...@googlegroups.com.
> Visit this group at http://groups.google.com/group/redis-db.
> For more options, visit https://groups.google.com/d/optout.



--
Salvatore 'antirez' Sanfilippo
open source developer - Pivotal http://pivotal.io

"If a system is to have conceptual integrity, someone must control the
concepts."
— Fred Brooks, "The Mythical Man-Month", 1975.
Reply all
Reply to author
Forward
0 new messages