Re: haproxy 1.4.7 and keep-alive

From: Patrick Mézard <pmezard#gmail.com>
Date: Sat, 12 Jun 2010 15:19:52 +0200


Le 12/06/10 07:09, Willy Tarreau a écrit :
> On Fri, Jun 11, 2010 at 11:40:18PM +0200, Patrick Mézard wrote:
>> Hello,

[... snip, thanks for the answers ...]

>> 3- "option forceclose" says:
>> --------
>> When this happens, it is possible to use "option forceclose". It will actively close the outgoing server channel as soon as the server has finished to respond. This option implicitly enables the "httpclose" option.
>> --------
>> Why is actively closing proxy to server connections related to closing the related proxy to client connection? Is it an implementation issue or by design?

>
> It is by design. Some servers ignored the "Connection: close" request
> header so even with httpclose you sometimes ended up with long
> connections. This was a disaster because the client waited for the
> server to close and the server did not. So the forceclose option
> was meant to send an active close to the server as soon as it began
> to respond, so that the end of the server's response caused an
> immediate close of this connection, forwarded to the client. But
> some servers did not accept that very well (fortunately, they did
> not need it). Since introduction of the keep-alive support, the
> option has been reworked so that the active close is sent when
> the server has finished responding. For compatibility with previous
> implementations, the close is still propagated to the client.
>
> So this is not even an issue, it's the required behaviour so that
> we don't break existing setups. The issues, if any, are the
> environments that require this option. Sometimes it can be replaced
> by http-server-close, sometimes it cannot due to buggy clients which
> wait for the close.

Ok, so this is for compatibility reasons. My point was it makes sense to actively close proxy/server connections if the servers do not honor "Connection: close" while maintaining persistent connections on the client side. Calling this "option forcecloseserver", we would have "option forceclose" == "option forcecloseserver" + "option httpclose". Just trying to build an accurate mental model of what's going on.

I will send patches to summarize these behaviours for newcomers like me, probably at the end of 1.1 section.

By the way, it is not easy to find haproxy git repositories. I think you should put a reference to them in the beginning of the "Download" section of the website. And cloning them is surprisingly slow (probably because it's done over HTTP).

--
Patrick Mézard
Received on 2010/06/12 15:19

This archive was generated by hypermail 2.2.0 : 2010/06/12 15:30 CEST