Hi Lukas,
I've tested in test environment, 1 client, 1 haproxy, 1 backend server.
Surely, no network, backend server issues.
In uri balance method, no issues happened.
In uri_param balance method, issues are reproduced.
My test configuration as belows,
frontend http-in
bind :80
acl rr hdr(host) -i test1.a.com
acl uri hdr(host) -i test2.a.com
use_backend bk_uri if uri
default_backend rr
backend bk_rr
id 101
balance roundrobin
option http-keep-alive
option prefer-last-server
server test01 1.1.1.1:80 maxconn 2000
backend bk_param
balance url_param q
hash-type consistent
option http-server-close
server test01 1.1.1.1:80 maxconn 2000
# ab -n 10 -k http://test2.a.com/test.jpg?q=111
with ab tool, this is reproduced easily.
What I want to do,
in roundrobin environment, is to support client/server-side keep-alive,
in uri, url-param etc environment, is to support client-side only keep-alive.
Regards,
Seri
-----Original Message-----
From: "Lukas Tribus"<[email protected]>
To: "Seri"<[email protected]>; "HAProxy"<[email protected]>;
Cc:
Sent: 2014-04-30 (수) 05:02:38
Subject: RE: in uri balance, http-keep-alive broken
Hi Seri,
> Hi,
>
> I've tested recent 1.5-dev24(a631fc8) git code.
>
> In frontend,
> option http-keep-alive
>
> In backend,
> balance uri or balance url_param
> option http-server-close
>
> In above configuration, server response is delayed or fail.
In a quick and unscientific test I was unable to reproduce this.
> Apr 29 17:01:31 localhost haproxy[1901]: x.x.x.x:7352 \
> [29/Apr/2014:17:01:01.163] http-in bk_tv/test1 \
> 12/0/0/112/30126 200 9773 - - sD-- 1/1/0/0/0 0/0
Can you capture example frontend and backend traffic and provide the file?
> In frontend, If I changed http-keep-alive into http-server-close, all
> works fine.
http-server-close overrides http-keep-alive [1], so what you are describing
is strange.
Please share the full configuration when you can reproduce the issue.
> In backend, If I changed "balance uri or balance url_param" into "balance
> roundrobin", all works fine.
Are you sure all your backends work correctly, because based on your
description this could also be a isolated issue on a single backend server
(and by changing load balancing algorithms and http-close you throw enough
entropy at the problem to disguise the result).
Please double check for network and backend issues.
url/url_param based load balancing doesn't really make sense with the current
keep-alive implementation. We don't do any connection pooling/multiplexing,
so you may as well use http-server-close if balancing via url/uri is a
requirement.
Regards,
Lukas
[1]
http://cbonte.github.io/haproxy-dconv/configuration-1.5.html#option%20http-keep-alive