Re: failover without downtime?

Paul Slootman <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <[email protected]>
On Thu 18 Feb 2016, Stig Brautaset wrote:
> Amir Dafny-Man <[email protected]> writes:
> >
> > I have no experience with haproxy but this may be solved via a configuration that replicates session information across haproxy instances.
> > Look at stick tables https://cbonte.github.io/haproxy-dconv/configuration-1.5.html#3.5
> 
> Thank you very much! This might indeed be very helpful for us. I assume
> that with that in place we should be able to just fail over keepalived
> by either stopping the keepalived master or bumping the priority on the
> current keepalived backup? The latter would be preferrable for us, as I
> assume it would affect only a particular VIP, rather than all the VIP
> managed by this keepalived instance.

I also have haproxy behind keepalived.

In my keepalived config I have:


vrrp_script chk_haproxy {
        script "/usr/bin/killall -0 haproxy"
        interval 10
}

vrrp_instance haproxy {
	[...]
	track_script {
		# add 20 points of prio if OK
                chk_haproxy weight 20
        }
}


This means that keepalived will stop being master if haproxy is not
running. You might want tot reduce the check interval though.


Paul

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.