Re: http-server-close and Logs

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 26 Apr 2011 11:20:26 +0200


Hi Kyle,

On Mon, Apr 25, 2011 at 06:22:08PM -0400, Kyle Brandt wrote:
> When capturing headers from Logs, as I understand it you will get the header
> for every request if "option httpclose" is set.
>
> 1) Is this correct?

yes.

> 2) Is this true for both captured response and request headers?

yes.

> 3) How does this behave with "option http-server-close" ?

exactly the same.

The principle is that due to keep-alive, it is possible to have multiple successive HTTP requests over a single TCP connection. Earlier versions of haproxy would only check the HTTP headers of the first request and ignore the data. Thus, it were unaware of subsequent requests. Option httpclose was used to force connection close after each request, which resulted in a new connection being established for each request. That way it was able to see all requests.

With 1.4, haproxy knows about the data, which makes keep-alive possible. It is then able to process all requests and responses of a same connection. However, for compatibility with deployed setups, option httpclose retains the old behaviour. Only "option http-server-close" will make keep-alive possible.

Since captures happen at the early stage of request and response processing, you really have a capture and a log of each request/response.

Hoping this clarifies it a bit,
Willy Received on 2011/04/26 11:20

This archive was generated by hypermail 2.2.0 : 2011/04/26 11:30 CEST