Re: loop in 1.5-dev4 ?
Thank you very much for fixing this! Martin Original-Nachricht Datum: Tue, 22 Mar 2011 11:57:24 +0100 Von: David du Colombier dducolomb...@exceliance.fr An: Martin Kofahl m.kof...@gmx.net CC: haproxy@formilux.org Betreff: Re: loop in 1.5-dev4 ? Hi, On Tue, 22 Mar 2011 07:36:17 +0100 Willy Tarreau w...@1wt.eu wrote: On Mon, Mar 21, 2011 at 12:52:23PM +0100, Martin Kofahl wrote: With 1.4 the backend works fine, but with 1.5-dev4 haproxy connects itself in stead of the backend. Can you please verify this behavior? Sounds like the server's address was resolved as 0.0.0.0 and that the system is connecting to itself :-( Could you please run that through strace and send the output. The only possible thing I see was that I broke something when merging the IPv6 work, maybe sometimes an address is not filled before a connect(). I can confirm this behavior. This bug was indeed caused by the recent IPv6 change. In backend.c, in function assign_server_address, if a server have no address, this address is replaced by the address the client asked. Since the IPv6 introduction, I added a function is_addr which returns 1 when an address is not empty. A mistake in this function caused the return value of IPv4 to be inverted. Therefore the server address was incorrectly replaced by the address requested by the client. In your case, you observed a loop because your server used the same port as HAProxy. Please find attached the small patch which fix this problem. -- David du Colombier
loop in 1.5-dev4 ?
Hi, I tried the following (shortened) configuration with the latest snapshot 1.5-dev4-20110317 and plain 1.5-dev4. frontend FRONT mode http bind 10.a.b.c:80 default_backend BACK backend BACK mode http server DEF 10.d.e.f:80 With 1.4 the backend works fine, but with 1.5-dev4 haproxy connects itself in stead of the backend. Can you please verify this behavior? Debug log (shortened) haproxy 1.4.4 :FRONT.accept(0005)=0007 from [10.x.y.z:2028] :FRONT.clireq[0007:]: GET /fff HTTP/1.1 :FRONT.clihdr[0007:]: Host: 10.a.b.c :BACK.srvrep[0007:0008]: HTTP/1.1 404 Not Found Debug log (shortened) haproxy 1.5-dev4 0001:FRONT.accept(0005)=0007 from [10.x.y.z:2034] 0001:FRONT.clireq[0007:]: GET /fff HTTP/1.1 0001:FRONT.clihdr[0007:]: Host: 10.a.b.c 0002:FRONT.accept(0005)=0009 from [10.a.b.c:38839] --- wrong!! 0002:FRONT.clireq[0009:]: GET /fff HTTP/1.1 0002:FRONT.clihdr[0009:]: Host: FRONT 0002:FRONT.clihdr[0009:]: X-Forwarded-For: 10.x.y.z 0002:FRONT.clihdr[0009:]: Connection: close 0003:FRONT.accept(0005)=000b from [10.a.b.c:38840] 0003:FRONT.clireq[000b:]: GET /fff HTTP/1.1 0003:FRONT.clihdr[000b:]: Connection: close 0003:FRONT.clihdr[000b:]: Host: FRONT 0003:FRONT.clihdr[000b:]: X-Forwarded-For: 10.a.b.c ... Kind regards Martin
Re: proper way to use an acl + stick-table to filter based on conn_cur
Do you know what's the differences between having the sticky-table on the front-end or on the back-end? Am I right in assuming that that unused keep-alive connections would be counted on the front-end only and in-use connections if the sticky-table is on the back-end (option http-server-close)? Martin On 15.03.2011 23:44, Cory Forsyth wrote: Interesting... I was able to get it to work using a stick-table on the front-end, as bartavelle mentioned from this URL: http://tehlose.wordpress.com/2010/12/15/fun-stuff-with-latest-haproxy-version/ I don't know enough C to dig into the code to check on that, though. On Tue, Mar 15, 2011 at 4:34 PM, Cyril Bonté cyril.bo...@free.fr mailto:cyril.bo...@free.fr wrote: Hi Willy and Cory, Le mardi 15 mars 2011 22:17:50, Willy Tarreau a écrit : Whether I use src_conn_cur or sc1_conn_cur, with or without the table argument, this does not work. No matter how many concurrent connections per ip in the stick table, they never get denied. Any suggestions? At first glance, I cannot spot anything wrong. I think there's a bug in the function acl_fetch_src_conn_cur() : its code contains return acl_fetch_conn_cnt(...) where it probably should be return acl_fetch_conn_cur(...) Sorry, I can't test it tonight but maybe this can help you. -- Cyril Bonté
share number of backend-server-connections among backend configurations
Hi, I have some backend-servers (eg A and B) in multiple backends (B has some special sites running that's why). Algorithm is least connection. But the information about the number of active connections is not shared between the backend configurations, even though servers have the same name. So if A has 10 connections in backend TWO, backend ONE will still see A as unused with 0 connections. Using the least connection algorithm I would wish that connection numbers are counted overall. Sample configuration frontend myfrontend *:80 acl acl_site1 url_sub use_backend TWO if acl_site1 default_backend ONE backend ONE server A ... server B ... backend TWO server A ... What can I do to use the least conn algorithm in this setup? Thank you! Martin
share number of server-connections among backends
Hi, I have some backend-servers (eg A and B) in multiple backends (B has some special sites running that's why). Algorithm is least connection. But this information is not shared between the backends, even though servers have the same name. So if A has 10 connections in backend TWO, backend ONE will still see A as unused with 0 connections. Using the least connection algorithm I would wish that connection numbers are counted overall. Sample configuration frontend myfrontend *:80 acl acl_site1 url_sub use_backend TWO if acl_site1 default_backend ONE backend ONE server A ... server B ... backend TWO server A ... What can I do to use the least conn algorithm in this setup? Thank you! Martin
Re: Load balacing based on XML tag
Hi, you can try using balance url_param param check_post. The check_post parameter lets haproxy to inspect the body, too. You may have to specify how many bytes haproxy will read. However, performance will suffer. Martin Original-Nachricht Datum: Wed, 24 Feb 2010 17:44:14 +1100 Von: Dan Nguyen dan.ngu...@salmat.com.au An: haproxy@formilux.org Betreff: Load balacing based on XML tag Hi All, I have a question. Can HAProxy load balance based on a XML tag inside a web services request? Thanks, Dan. *** This e-mail, including any attachments to it, may contain confidential and/or personal information. If you have received this e-mail in error, you must not copy, distribute, or disclose it, use or take any action based on the information contained within it. Please notify the sender immediately by return e-mail of the error and then delete the original e-mail. The information contained within this e-mail may be solely the opinion of the sender and may not necessarily reflect the position, beliefs or opinions of the organisation on any issue. This email has been swept for the presence of computer viruses known to the organisation’s anti-virus systems. ***
haproxy opens random udp port
Hi, I'm testing haproxy 1.4-dev6 and wonder about a random chosen (but above 32000?) udp port opened by haproxy. Haproy binds to tcp/80 and has syslog logging enabled to 127.0.0.1:514. What is this port for? # lsof -iUDP -P haproxy 19534 haproxy5u IPv4 4962049 UDP *:32773 Martin