Created
December 4, 2017 09:57
-
-
Save unicorn667/58f211edfcbcb3ea83d31a13ce6a448e to your computer and use it in GitHub Desktop.
keepalived with haproxy ha, slave
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
# Keepalived process identifier | |
lvs_id haproxy_DH_passive | |
} | |
# Script used to check if HAProxy is running | |
vrrp_script check_haproxy { | |
script "killall -0 haproxy" | |
interval 2 | |
weight 2 | |
} | |
# Virtual interface | |
# The priority specifies the order in which the assigned interface to take over in a failover | |
vrrp_instance VI_01 { | |
state SLAVE | |
interface eth0 | |
virtual_router_id 51 | |
priority 100 | |
# The virtual ip address shared between the two loadbalancers | |
virtual_ipaddress { | |
10.10.1.20 | |
} | |
track_script { | |
check_haproxy | |
} | |
} | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment