Re: haproxy & websockets

From: Willy Tarreau <w#1wt.eu>
Date: Tue, 27 Apr 2010 22:28:32 +0200


Hi Laurie, hi Dustin,

First, Dustin, you really need to get a very recent version of haproxy. 1.4.4 is fine. This is particularly important because handling of the 101-switching protocol is something new (and the WebSockets draft is evolving quickly and the latest version is not anymore compatible with earlier implementations).

On Tue, Apr 27, 2010 at 10:24:20AM +0100, Laurie Young wrote:
> We are doing something very similar. I have a sample of our config file
> below. However this is not perfect. We are seeing a lot of dirty connections
> for normal http traffic because of the long timeout,
> and we are having some, as yet not-fully-diagnosed issues with incorrectly
> terminated connections to the http backend.

I'm realizing that given your extremely large timeouts, you may want to try "option nolinger" in the frontend to get rid of the kernel socket buffers when haproxy decides to timeout a connection. That will avoid needless FIN_WAIT2 states that can last for ages. Be careful though, as it also means that clients who don't receive the last packet of a connection might get a RST when asking for it again because the kernel will not buffer data longer than the socket's life.

Regards,
Willy Received on 2010/04/27 22:28

This archive was generated by hypermail 2.2.0 : 2010/04/27 22:30 CEST