Skip to content

Conversation

@evensis
Copy link

@evensis evensis commented Nov 20, 2014

Hi there,

I recently had a requirement to extend the redis cache module to support automatic failover to another server, I've implemented this via the phpredis module, and thusly have a check wrapped around the code to make sure this exists in the php build. Main reason for this direction is I didn't have the time to learn how it works, and any overheads that would be tied to instantiating the credis_client class twice for the check. This code does add an additional overhead, so it should really only be turned on if it is needed.

Thanks!

@colinmollenhour
Copy link
Owner

Thanks for the PR, but I think failover is much better handled by the official solution for high availability: Redis Sentinel.

@evensis
Copy link
Author

evensis commented Nov 20, 2014

Interesting, I didn't know this existed. We have a failover configured on our cluster for Redis via rgmanager, although there's usually around 30 second window before it notices it and spools up the Redis daemon on another cluster node (resulting in a stack trace on the website during this window), this PR makes it instantaneous so works well for us at least. Will certainly investigate Sentinel as another solution. Thanks!

@colinmollenhour
Copy link
Owner

Check @ThijsFeryn's work over at #62.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants