Re: HAProxy pconn question

From: Willy Tarreau <w#1wt.eu>
Date: Fri, 1 Apr 2011 07:43:51 +0200


Hi Mike,

On Wed, Mar 30, 2011 at 01:12:21PM -0700, Mike Oxford wrote:
> >From what I can tell via Docs + The Great Google<tm> I see that HAProxy
> seems to work in three ways for HTTP/1.1 persistant connections.
>
> 1) Full keep alive, 1:1 mapped client-server. All requests go to the same
> server.
> 2) option http-server-close Keep client side open, shut down server side.
> 3) option httpclose Shut down both server and client side.
>
> I am looking for something which will keep m-servers AND n-clients
> connected, but which will balance around the open connections between two
> realms.
>
> Once the clients and servers are connected I would like to balance them
> without rebuilding ANY of the sockets on either "side."

This is what we'll get when the server-side keep-alive work is completed and fully operational. In a first step, server connections will be closed if the request needs to switch to another server. Later, we'll try to reuse existing connections for compatible requests (ie: idempotent ones).

> Does HAProxy support this in anyway that I have not seen, hopefully in the
> L3/4 area and not using HTTP/1.1 keep alive semantics?

No, you absolutely need to respect HTTP semantics to be able to balance requests across connections. Reusing an existing connection is even much harder because there are a lot of requests that you're not allowed to send over an existing connection if you don't know the connection's state and are not able to replay the request in case of failure.

Regards,
Willy Received on 2011/04/01 07:43

This archive was generated by hypermail 2.2.0 : 2011/04/01 08:00 CEST