7

I'm using Redis for some time and now we want to move to a redundant cluster which would be fault tolerant, highly available and load balanced.

I principally use Redis for some PHP web application which stores some process status information (I'm using PHPRedis for this) and I would like to use it also for PHP session store in a load balanced cluster.

I already have a Load Balancing that I use for Nginx and MySQL (based on pfSense).

I saw that Redis Cluster exists for Redis 3, but I also read some comments about the fact that it is not ready for production, others that tells that Redis cannot do a complete master/master cluster configuration.

What is your advise?

  • Try Redis Cluster
  • Move to another key=value engine (CouchDB? Memcached? Others?)
  • Don't mind about load balancing and use only one node of the cluster per time, and having a manual failover, as I don't use persistence
  • Other ideas?

Thank you very much for your help!

5

Redis Sentinel will allow you to run multiple instances of redis and handles failover for you. http://redis.io/topics/sentinel

  • 1
    // , Mat, did it work? – Nathan Basanese Feb 2 '16 at 21:25
  • 2
    The question specifically mentions load balancing, which Sentinel doesn't do. You should at least address that in your comment. – Adam Lassek Sep 14 '18 at 17:44
1

An obvious solution to loadbalance redis is to use sentinel.

As far as I can see predis does not support sentinel as of now. See:

https://github.com/nrk/predis/issues/131

A possible solution can be Redis sentinel + HAProxy failover if you want to keep using predis.

  • @Pierre.Vriens maybe I am not following you correctly but as far as I see the question is how to loadbalance redis. I am pointing out that an obvious solution like sentinel will not work when using predis. Possibly that was not clear from my answer. – Kim Feb 24 '16 at 15:26
  • ok, that helps a bit to better understand your answer. I think you should edit it to somehow integrate that in it also (and then delete your comment). – Pierre.Vriens Feb 24 '16 at 16:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.