Skip to content

Instantly share code, notes, and snippets.

@vladbabii
Created January 14, 2017 21:42
Show Gist options
  • Save vladbabii/b39decc1fab501bf8916f298d82a7bd0 to your computer and use it in GitHub Desktop.
Save vladbabii/b39decc1fab501bf8916f298d82a7bd0 to your computer and use it in GitHub Desktop.
keepalived multi-master (aka equal) with 2 or more services (in this case apache and repcached)
vrrp_script chk_apache2 {
script "/usr/bin/killall -0 apache2"
interval 2
fall 2
rise 2
weight 30
}
vrrp_script chk_repcached {
script "/usr/bin/killall -0 repcached"
interval 2
fall 2
rise 2
weight 20
}
vrrp_instance VI_104 {
state BACKUP
priority 100
interface eth0
virtual_router_id 104
priority 100
unicast_src_ip 172.16.62.104
unicast_peer {
172.16.61.104
}
authentication {
auth_type PASS
auth_pass rnmgerigjrijjh59hu590h9s
}
virtual_ipaddress {
172.16.60.104/16 dev eth0 label eth0.1
10.6.250.104/16 dev eth1 label eth1.1
10.11.60.104/16 dev eth2 label eth2.1
}
track_script {
chk_apache2
chk_repcached
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment