On Wed, Aug 1, 2012 at 1:13 PM, mark green <[email protected]> wrote:
> Hi,
>
>    when haproxy forward a http request to server, and received response from
> backend server,
> forward it to client, will haproxy receive another request on the same
> socket before this response is forwarded to client?
> and, how to decide this response is completely forwarded to client?
>
> Thanks

Hi Mark,

It depends on the options you have enabled on HAProxy, and in some
cases, on the server itself.
The options I'll speak about are "http-server-close" and "httpclose".
If none of them are set in your configuration, then you're in the
tunnel mode, which means HAProxy will analyze the first request then
maintain opened a tunnel between the client and the server, where
every data being transferred won't be analyzed.
In this mode, this is up to the server to decide when to close the connection.

If you setup httpclose, then HAProxy will close the TCP connection
after each request for both client and server, announcing the HTTP
header "Connection: close".

If you setup http-server-close, then HAProxy will use HTTP keep alive
to maintain the TCP connection opened on the client side only. On the
server side, a new TCP connection will be opened per each HTTP
requests.

I don't understand your last question.
Could you be clearer?

Baptiste

Reply via email to