Re: Possible to option httpclose on only some servers?

From: Willy Tarreau <w#1wt.eu>
Date: Mon, 8 Oct 2007 17:31:32 +0200


Hi,

On Wed, Oct 03, 2007 at 12:38:23PM -0400, Lauro, John wrote:
> If I use "option hhttpclose", it kills persistent connections.
> Persistent connections would generally be good for performance. Plus,
> it helps from collecting tons and tons of TIME_WAIT connections....

Persistent connections are generally good for response time perceived from remote clients, but it is not for the servers themselves, as dealing with tens of thousands of idle concurrent connections is often more expensive than closing them ASAP.

> I would like some connection throttling as right now the backend is
> slightly overworked. However I am worried that because persistent
> connections can be open for awhile with no activity, it can make the
> maxconn pointless. Too high, and doesn't protect the server, and too
> low and a bunch of idle sessions can essentially hog the web server.
>
> Obviously I have no real experience with load balancers yet (just been
> reading off the internet, etc), and the my real problem is in the
> back-end / not enough application servers, so this may be a totally
> pointless idea.... Would be nice to have two queues (or probably just
> two server entries pointing to the same server), where httpclose is
> forced on only one of the queues. Is this possible? (ie: placing
> option commands between server lines to turn on/off httpclose for
> different server entries?

No it is not possible. However, I assume that the reason you want this is because you have two sets of servers that you can identify by one information (URI, hostname, ...). Then, you can define two backends, one with httpclose, the other without. And you play with the ACLs to select the backend you want to connect to.

> Don't recall seeing configurations like
> that in any of the examples). This is assuming that a client wouldn't
> get confused is some of it's connections might be allowed to be
> persistent and some might not.

Agreed, anyway persistent connection are not always respected when requested by clients. It's a negociation. The best of both ends' capabilities is selected. Many servers automatically disable the keepalive when they have too many active connections.

> Ideally, as done in some load balancers, you can do connection pooling
> where it can have persistent connections between balancer and server,
> even if not persistent between client and balancer. That would be a
> major change... and plans for that in the future?

It is planned for the future. But I have to do a major rework of the network layering before this can be done.

Regards,
Willy Received on 2007/10/08 17:31

This archive was generated by hypermail 2.2.0 : 2007/11/04 19:21 CET