I am looking to implement a HA redis implementation using Master-Slave redis servers. The web servers will connect to these through an HAProxy instance installed on each box.

The situation is easy with only two servers, if one goes down the other has to be made the new master. But what about when there are more than one slaves and either one of the remaining slaves can be promoted to master? I know redis sentinel has a notification mechanism in the event of a failover but how do I use it to interact with the HAproxy's on each of the web servers and tell them which server is the new master?

First time working with redis and replication/failover in general.


I guess this is what you are looking for, this setup can be easily changed to abstract slave-reads, too.


Cheers, Jan

| improve this answer | |
  • 1
    works perfect for me :) it would be recommended to extract key parts from that post in case the link goes missing in future and so that your answer is better – anthonysomerset Jan 15 '14 at 21:02

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.