Created
November 14, 2014 18:57
-
-
Save francolaiuppa/9507d003c9694c451bee to your computer and use it in GitHub Desktop.
Example HAProxy 1.5 configuration for load-balancing Redis nodes with Sentinel (including health checks!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
backend messages | |
mode tcp | |
option tcplog | |
option tcp-check | |
#tcp-check send AUTH\ foobar\r\n | |
#tcp-check expect +OK | |
tcp-check send PING\r\n | |
tcp-check expect +PONG | |
tcp-check send info\ replication\r\n | |
tcp-check expect string role:master | |
tcp-check send QUIT\r\n | |
tcp-check expect string +OK | |
server redis15 192.168.15.40:6379 maxconn 1024 check inter 1s | |
server redis17 192.168.15.41:6379 maxconn 1024 check inter 1s | |
server redis19 192.168.15.42:6379 maxconn 1024 check inter 1s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment