Re: "option httpchk" is reporting servers as down when they're not
On Wed, Mar 4, 2009 at 4:05 AM, Allen, Thomas wrote: > Hi, > > I like the idea of having HAProxy check server health, but for some reason, > it reports all of my servers as down. Here's my full config: > > listen http_proxy :80 > mode http > balance roundrobin > option httpchk > server webA {IP} cookie A check > server webB {IP} cookie B check > > I tried "option httpchk /index.php" just to be sure, and got the same > result. If I remove the httpchk option, HAProxy has no problem proxying > these servers. What am I doing wrong? > what's listed under "Status" for these servers when viewing your haproxy status page? -jf -- In the meantime, here is your PSA: "It's so hard to write a graphics driver that open-sourcing it would not help." -- Andrew Fear, Software Product Manager, NVIDIA Corporation http://kerneltrap.org/node/7228
Re: load balancer and HA
On Tue, Mar 3, 2009 at 6:20 PM, Martin Karbon wrote: > Malcolm Turnbull wrote: >> >> Martin, >> >> Why would the session be lost? >> The second haproxy instance would recognise the cookies and send to >> the correct server in the application pool. >> > > I was just thinking that some information about which client is > connected to which server has to be stored locally on the load balancer > so just sharing the IP using heartbeat and making the process haproxy > start wouldn't do the trick, but I guess I haven't tried that in > practice ... I'll try the failover tomorrow :) I haven't played with haproxy cookies, yet, but theoretically session information can be baked into cookies such that the cookies presented by the browser tell the load balancer which backend server was maintaining the connection. (F5 supports this as well). >> >> Unless you mean the actual TCP session? >> I'm pretty sure even F5 doesn't support TCP session fail over, and the >> replication of tcp sessions would swamp the network. >> > > The products I've seen were those F5 had to show and I think that what > they meant, as far as I've understood well, was that the tcp session was > carbon copied and kept alive on the backup load balancer so that no > "information" would be lost. But as I said, not having very much > technical knowledge, that is what I have understood. F5 does have an option to do full TCP session mirroring. Of course this has it's drawbacks. (Lowers the traffic a BigIP can handle). In the open source realm Ultramonkey does support some form of session mirroring called, "Connection Synchronization". See: http://www.ultramonkey.org/3/lvs.html for more details. Please keep in mind UltraMonkey is a Linux only load balancing solution, and unlike haproxy can't run on pretty much every modern *nix platform. >> Or have I got the wrong end of the stick as usual? >> >> > > no I guess you got everything right ... btw thanks for the quick answer >> >> >> >> >> 2009/3/3 Martin Karbon >> >>> >>> Hi! >>> just wanted to know if anyone knows an opensource solution for a so >>> called transparent failover: what I mean with that is, I installed two >>> machines with haproxy on it which comunicate with each other via heartbeat. >>> If one fails the other one goes from passive to active but all sessions are >>> lost and users have to reconnect. >>> I've seen some costly solutions for load balancing which claim to have >>> some sort of shared memory to allow this kind of failover with which users >>> do not lose connection, so I was just wondering if someone knows a product >>> or has some ideas on how this kind of technology is implementable. >>> Best regards >>> Martin >>> >>> >> >> >> >> -- >> Regards, >> >> Malcolm Turnbull. >> >> Loadbalancer.org Ltd. >> Phone: +44 (0)870 443 8779 >> http://www.loadbalancer.org/ >> >> >> >> No virus found in this incoming message. >> Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: >> 270.11.7/1982 - Release Date: 03/03/09 16:09:00 >> >> > > > > -- - Brian Gupta New York City user groups calendar: http://nyc.brandorr.com/
Re: load balancer and HA
Malcolm Turnbull wrote: Martin, Why would the session be lost? The second haproxy instance would recognise the cookies and send to the correct server in the application pool. I was just thinking that some information about which client is connected to which server has to be stored locally on the load balancer so just sharing the IP using heartbeat and making the process haproxy start wouldn't do the trick, but I guess I haven't tried that in practice ... I'll try the failover tomorrow :) Unless you mean the actual TCP session? I'm pretty sure even F5 doesn't support TCP session fail over, and the replication of tcp sessions would swamp the network. The products I've seen were those F5 had to show and I think that what they meant, as far as I've understood well, was that the tcp session was carbon copied and kept alive on the backup load balancer so that no "information" would be lost. But as I said, not having very much technical knowledge, that is what I have understood. Or have I got the wrong end of the stick as usual? no I guess you got everything right ... btw thanks for the quick answer 2009/3/3 Martin Karbon Hi! just wanted to know if anyone knows an opensource solution for a so called transparent failover: what I mean with that is, I installed two machines with haproxy on it which comunicate with each other via heartbeat. If one fails the other one goes from passive to active but all sessions are lost and users have to reconnect. I've seen some costly solutions for load balancing which claim to have some sort of shared memory to allow this kind of failover with which users do not lose connection, so I was just wondering if someone knows a product or has some ideas on how this kind of technology is implementable. Best regards Martin -- Regards, Malcolm Turnbull. Loadbalancer.org Ltd. Phone: +44 (0)870 443 8779 http://www.loadbalancer.org/ No virus found in this incoming message. Checked by AVG - www.avg.com Version: 8.0.237 / Virus Database: 270.11.7/1982 - Release Date: 03/03/09 16:09:00
Re: load balancer and HA
On Tue, Mar 3, 2009 at 11:44 PM, Martin Karbon wrote: > just wanted to know if anyone knows an opensource solution for a so called > transparent failover: what I mean with that is, I installed two machines > with haproxy on it which comunicate with each other via heartbeat. If one > fails the other one goes from passive to active but all sessions are lost > and users have to reconnect. We use Heartbeat (http://www.keepalived.org/) for this. Heartbeat lets us set up virtual service IPs which are reassigned to another box if the box goes down. Works like a charm. Current connections are lost, but new ones go to the new IP. Note that there are two current versions of Heartbeat. There's the old 1.x series, which is simple and stable, but which has certain limitations such as only supporting two nodes, if I remember correctly. Then there's 2.x, which is much more complex and less stable. We run 2.0.7 today, and we have had some situations where the Heartbeat processes have run wild. It's been running quietly for over a year now, so recent patches may have fixed the issues. I would still recommend sticking with 1.x if at all possible. While there are solutions out there that preserve connections on failover, my gut feeling is that they introduce a level of complexity and computational overhead that is necessarily puts a restraint on performance. Alexander.
Re: load balancer and HA
Martin, Why would the session be lost? The second haproxy instance would recognise the cookies and send to the correct server in the application pool. Unless you mean the actual TCP session? I'm pretty sure even F5 doesn't support TCP session fail over, and the replication of tcp sessions would swamp the network. Or have I got the wrong end of the stick as usual? 2009/3/3 Martin Karbon > > Hi! > just wanted to know if anyone knows an opensource solution for a so called > transparent failover: what I mean with that is, I installed two machines with > haproxy on it which comunicate with each other via heartbeat. If one fails > the other one goes from passive to active but all sessions are lost and users > have to reconnect. > I've seen some costly solutions for load balancing which claim to have some > sort of shared memory to allow this kind of failover with which users do not > lose connection, so I was just wondering if someone knows a product or has > some ideas on how this kind of technology is implementable. > Best regards > Martin > -- Regards, Malcolm Turnbull. Loadbalancer.org Ltd. Phone: +44 (0)870 443 8779 http://www.loadbalancer.org/
load balancer and HA
Hi! just wanted to know if anyone knows an opensource solution for a so called transparent failover: what I mean with that is, I installed two machines with haproxy on it which comunicate with each other via heartbeat. If one fails the other one goes from passive to active but all sessions are lost and users have to reconnect. I've seen some costly solutions for load balancing which claim to have some sort of shared memory to allow this kind of failover with which users do not lose connection, so I was just wondering if someone knows a product or has some ideas on how this kind of technology is implementable. Best regards Martin
"option httpchk" is reporting servers as down when they're not
Hi, I like the idea of having HAProxy check server health, but for some reason, it reports all of my servers as down. Here's my full config: listen http_proxy :80 mode http balance roundrobin option httpchk server webA {IP} cookie A check server webB {IP} cookie B check I tried "option httpchk /index.php" just to be sure, and got the same result. If I remove the httpchk option, HAProxy has no problem proxying these servers. What am I doing wrong? Thanks, Thomas Allen Web Developer, ASCE 703.295.6355