Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
defaults
mode tcp
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http
bind :8080
default_backend stats
backend stats
mode http
stats enable
stats enable
stats uri /
stats refresh 1s
stats show-legends
stats admin if TRUE
frontend redis-alpha
bind *:6379
default_backend redis-alpha
backend redis-alpha
mode tcp
balance first
option tcp-check
tcp-check send auth\ YOUR_AUTH_FOR_REDIS\r\n
tcp-check send info\ replication\r\n
tcp-check expect string role:master
server redis-alpha:10.0.0.13:6379 10.0.0.13:6379 maxconn 1024 check inter 1s
server redis-alpha:10.0.0.4:6379 10.0.0.4:6379 maxconn 1024 check inter 1s
backend redis-online
mode tcp
balance first
option tcp-check
tcp-check send auth\ YOUR_AUTH_FOR_REDIS\r\n
tcp-check send PING\r\n
tcp-check expect string +PONG
server redis-alpha:10.0.0.13:6379 10.0.0.13:6379 maxconn 1024 check inter 1s
server redis-alpha:10.0.0.4:6379 10.0.0.4:6379 maxconn 1024 check inter 1s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.