HAPROXY & pool of keep-alive connections to backend

From: Maciej Bednarz <bednarz.hannover#googlemail.com>
Date: Wed, 8 Sep 2010 20:01:42 +0200


Hello,

I have a problem with haproxy configuration. First let me explain my scenario. I have two hardware servers:

Server A runs a HAPROXY 1.4 and is accessible by HTTP clients Server B runs two instances of HTTP backend software (two sockets) and is only accessible by HAPROXY

When now "thousands" of "crazy" clients access HAPROXY (500 mixed non keep-alive and keep-alive requests/second), all requests are forwarded 1:1 to my backend. If I have on Server A 100.000 sockets in TIME_WAIT, the same amount of sockets are also in the same state on Server B. What I need is some kind of rewirte / multiplexing / pooling mechanizm to achive the following:

HAPROXY keeps 100 keep-alive connections to the backend and uses them as a pool. No new connections are opened. When now a client will access the HAPROXY its request should be distributed to one of the allready existing connections without opening a new connection to the backend.

The connections are not stateful, so a repeating request does not have to return to the same connection. I am unexperienced with HAPROXY and looking just for a solution. Is this possible? Can someone provide my an example configuration?

Than you very very much,

Maciej Received on 2010/09/08 20:01

This archive was generated by hypermail 2.2.0 : 2010/09/08 20:15 CEST