Re: Two HAProxy instances with a shared IP
Hi Phil, I have just been through this exact exercise. I have just posted my results to the Pound Proxy mailing list (so sorry to anyone that is a subscriber there, here is comes again!). This is the post I just sent, keepalived is so simple and I have it working with Pound and HAProxy; Hi All, Thanks for all your responses! I have successfully implemented this now using keepalived. I would thoroughly recommend this to anyone looking for IP failover, is really easy to do. Download & compile which is as easy as; wget http://www.keepalived.org/software/keepalived-1.2.7.tar.gz gunzip keepalived-1.2.7.tar.gz tar -xf keepalived-1.2.7.tar cd keepalived-1.2.7/ sudo apt-get install libpopt-dev snmp snmpd libnl1 libnl-dev libssl-dev make libsnmp-dev ./configure --enable-snmp make sudo make install Then the following basic config will get you up and running with a basic set up; vrrp_instance pound_ips { state MASTER interface eth1 virtual_router_id 10 priority 100 advert_int 1 nopreempt virtual_ipaddress { 192.168.0.250 } authentication { auth_type PASS auth_pass bxUcbz52FE38 } } That reall is the bare minimum which will get you up and running. I made some notes here; http://null.53bits.co.uk/index.php?page=keepalived Cheers to all, James. On 8 April 2013 14:36, Phil Daws wrote: > Hello, > > am making my first foray into setting up a test lab to play around with > HAProxy. Ideally I am hoping to build an environment which consists of two > HAProxy nodes that share an IP address, and each node then offloads HTTP > connections to two backend web servers. Basically build a meshed architecture > for no single point of failure. It looks like the best route would be to use > Wackamole and Spread for the shared IP address. Am building on CentOS 6.4 so > would be grateful for your thoughts on this setup or whether there is a more > appropriate one. If all works well then hopefully can start to look at LB/HA > for other services. > > Many thanks, >
Re: Two HAProxy instances with a shared IP
On 4/9/13 5:27 PM, Jeff Zellner wrote: Hey Phil, I've recently been evaluating all of the above. Wackamole + Spread have so far worked the best for me (distributing a number of VIP's across a cluster of HAProxy machines with, allowing failover). Heartbeat didn't seem to work well in my environment, and I had a lot of trouble getting ucarp configured just-right. Not sure what environment you're in, but we run HAProxy with Pacemaker on RHEL, and it works pretty much flawlessly. In some cases we do active/passive VIPs the way most HA systems do, but others we use BGP to advertise /32 routes into the network and use that to get traffic to our load balancers. Works nicely, especially since not everything has to be on the same VLAN to support it. David
Re: Two HAProxy instances with a shared IP
Hey Phil, I've recently been evaluating all of the above. Wackamole + Spread have so far worked the best for me (distributing a number of VIP's across a cluster of HAProxy machines with, allowing failover). Heartbeat didn't seem to work well in my environment, and I had a lot of trouble getting ucarp configured just-right. It could be that I was just doing-it-wrong, but Wackamole + Spread have been relatively painless other than some oddities declaring spread segments (requiring me to only list one host per segment). Cheers, Jeff On Tue, Apr 9, 2013 at 4:51 PM, Phil Daws wrote: > Thank you Jerome. Am looking at KeepAlived, UCARP and VRRP though not sure > which way to go at the moment from a pro/cons perspective. Thanks. > - Original Message - > From: "Jérôme Benoit" > To: haproxy@formilux.org > Cc: "Phil Daws" > Sent: Tuesday, 9 April, 2013 9:42:53 PM > Subject: Re: Two HAProxy instances with a shared IP > > On Mon, 8 Apr 2013 14:36:52 +0100 (BST) in > <564091370.1183442.1365428212786.javamail.r...@innovot.com>, > Phil Daws Phil Daws wrote: > >> Hello, > > Hello, > >> am making my first foray into setting up a test lab to play around with >> HAProxy. Ideally I am hoping to build an environment which consists of two >> HAProxy nodes that share an IP address, and each node then offloads HTTP >> connections to two backend web servers. Basically build a meshed >> architecture for no single point of failure. > > A mesh for a shared IP ? How ? Encapsulating the IP datagram ? > >>It looks like the best route would be to use Wackamole and Spread for the >>shared IP address. > > or keepalived or carp. > >> Am building on CentOS 6.4 so would be grateful for your thoughts on this >> setup or whether there is a more appropriate one. If all works well then >> hopefully can start to look at LB/HA for other services. > > The wackamole solution seem only valuable if you have more than one shared IP. > > ++. > > -- > Jérôme Benoit aka fraggle > La Météo du Net - http://grenouille.com > OpenPGP Key ID : 9FE9161D > Key fingerprint : 9CA4 0249 AF57 A35B 34B3 AC15 FAA0 CB50 9FE9 161D >
Re: Two HAProxy instances with a shared IP
Thank you Jerome. Am looking at KeepAlived, UCARP and VRRP though not sure which way to go at the moment from a pro/cons perspective. Thanks. - Original Message - From: "Jérôme Benoit" To: haproxy@formilux.org Cc: "Phil Daws" Sent: Tuesday, 9 April, 2013 9:42:53 PM Subject: Re: Two HAProxy instances with a shared IP On Mon, 8 Apr 2013 14:36:52 +0100 (BST) in <564091370.1183442.1365428212786.javamail.r...@innovot.com>, Phil Daws Phil Daws wrote: > Hello, Hello, > am making my first foray into setting up a test lab to play around with > HAProxy. Ideally I am hoping to build an environment which consists of two > HAProxy nodes that share an IP address, and each node then offloads HTTP > connections to two backend web servers. Basically build a meshed architecture > for no single point of failure. A mesh for a shared IP ? How ? Encapsulating the IP datagram ? >It looks like the best route would be to use Wackamole and Spread for the >shared IP address. or keepalived or carp. > Am building on CentOS 6.4 so would be grateful for your thoughts on this > setup or whether there is a more appropriate one. If all works well then > hopefully can start to look at LB/HA for other services. The wackamole solution seem only valuable if you have more than one shared IP. ++. -- Jérôme Benoit aka fraggle La Météo du Net - http://grenouille.com OpenPGP Key ID : 9FE9161D Key fingerprint : 9CA4 0249 AF57 A35B 34B3 AC15 FAA0 CB50 9FE9 161D
Re: Two HAProxy instances with a shared IP
On Mon, 8 Apr 2013 14:36:52 +0100 (BST) in <564091370.1183442.1365428212786.javamail.r...@innovot.com>, Phil Daws Phil Daws wrote: > Hello, Hello, > am making my first foray into setting up a test lab to play around with > HAProxy. Ideally I am hoping to build an environment which consists of two > HAProxy nodes that share an IP address, and each node then offloads HTTP > connections to two backend web servers. Basically build a meshed architecture > for no single point of failure. A mesh for a shared IP ? How ? Encapsulating the IP datagram ? >It looks like the best route would be to use Wackamole and Spread for the >shared IP address. or keepalived or carp. > Am building on CentOS 6.4 so would be grateful for your thoughts on this > setup or whether there is a more appropriate one. If all works well then > hopefully can start to look at LB/HA for other services. The wackamole solution seem only valuable if you have more than one shared IP. ++. -- Jérôme Benoit aka fraggle La Météo du Net - http://grenouille.com OpenPGP Key ID : 9FE9161D Key fingerprint : 9CA4 0249 AF57 A35B 34B3 AC15 FAA0 CB50 9FE9 161D signature.asc Description: PGP signature