On Fri, Apr 26, 2013 at 9:01 AM, Sheldon Hearn <
shel...@starjuice.net> wrote:
> I do hope you didn't receive my previous email as a dismissal of the
> future value of Sentinel. I very much look forward to it. :-)
No prob, I would love if Sentinel was not needed at all and Redis HA
would be trivial, less problems!
Btw in recent commits the initial problem you had was now addressed
(reconfiguration of returning master).
>> 1) Failure is much more objective than, client XYZ can't talk with the
>> master.
>
> The great thing about Redis pub/sub is that it provides a fast,
> reliable, in-band transport for sentinels and/or HA clients to
> establish quorum.
Implementing this client side is possible but not a design I like.
1) Quorum is bound to number of participants you have, and with
clients it is not easy to guess, they change over time.
2) Persistent connections are probably needed, and some way to wake-up
idle connections, otherwise if there is just one active client
everything will stop working.
3) There are complex failure scenarios like the server responding but
very slowly, clients need to have all explicit timeouts to handle
that.
4) You need to take a lot of state client side or need zookeeper or
alike as a coherent repository of the current configuration.
And so forth. You can solve everything and do this client side, but my
subjective consideration is that Sentinel is a better solution to
client-triggered failover.
>> 2) Allow any kind of client to directly interact with the Redis
>> master, without intermediate layers.
>
> I think this is why it's important to have a Sentinel *client*.
>
> And for HA clients, the Sentinel *protocolo* will be great. And if all
> your clients are HA clients that use the Sentinel protocol... well you
> don't need dedicated Sentinel clients. You get to choose, and I think
> that will be wonderful.
This does not change the overall design, at the end of the day you
have different possibilities:
1) A proxy that handles everything and is transparent.
2) Client-driven HA with something like zookeeper to avoid split-brain issues.
3) A completely distributed system like Sentinel.
This is a oversimplification, you have many components:
A) Detection of failure.
B) Point of view of the detection: where the controller is placed on
the network?
C) Action: who will perform the failover.
D) Collaboration: will another device continue or restart the work of
a device that failed, for instance, during the failover?
E) Configuration propagation: how will be clients be informed?
There are infinite solutions, I picked what I think is a good trade
off in Sentinel because while it's a "ready to run" system once you
have minimal client support, you can hack a lot of the above if you
want, by placing sentinels in different places, executing scripts, and
configuring a given quorum.
Thanks for arguing, it's an interesting topic.
Cheers,
Salvatore
>
> Ciao,
> Sheldon.