[Redis] Sentinel
Damien Krotkine
damien at krotkine.com
Tue Jan 14 08:29:29 GMT 2014
On Mon, Jan 13, 2014, at 11:19 PM, Steffen Mueller wrote:
> Hi,
>
> On 01/12/2014 07:30 PM, Damien Krotkine wrote:
> > I've reimplemented the support of Sentinel in Redis (sorry Steffen! :P )
> >
> > It's in the sentinel2 branch on github.
> >
> > I would very much appreciate if anyone can test it. I've provided a test
> > ( t/60... ) but it's a very simple situation with 2 sentinels and one
> > master, and a lot of cases are not tested.
> >
> > Steffen: feel free to argue about this reimplementation, if you think
> > things are missing or it's not modular enough or whatnot.
>
> I haven't had a chance to take a look until now, but didn't want to
> delay answering any longer lest you think I'm angry/disappointed/sad/let
> down/whatever. I'm not. My attachment to my code isn't that strong. :)
hehe, cool :)
>
> The only feedback I have is that
>
> + ) # TODO make the timeout configurable
>
> should probably be done before including it in a stable release
Yes, agreed, I'll add a sentinel_timeout parameter or something
> and a
> question: My abstraction was to have a Sentinel*s* (plural) object. You
> now have a Sentinel (singular) object. And that's how the code actually
> works. The singular allows you to just subclass. I'm not sure how that
> works with some of the logic that relies on knowing about all sentinels
> rather than just the one you're connected to. I suppose that's owned by
> the top level Redis object?
Yes, the list of sentinels for the service is just an ArrayRef in the
Redis instance. It gets updated when a sentinel is reached, and
informations about linked sentinels can be retrieved. I didn't feel the
need of having a class to represent the sentinels list, but I welcome
counter arguments on that.
>
> --Steffen
>
> _______________________________________________
> Redis mailing list
> Redis at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/redis
More information about the Redis
mailing list