haproxy-1.4.3 and keep-alive status

From: Dmitry Sivachenko <mitya#cavia.pp.ru>
Date: Thu, 8 Apr 2010 13:44:09 +0400


Hello!

I am tasting version 1.4.3 of haproxy and I am getting a bit confused with HTTP keep-alive support status.

  1. Is server-side HTTP keep-alive supported at all? The existence of option http-server-close makes me beleive that it is enabled unless that option is used.
  2. Is it true that client side HTTP keep-alive is also enabled by default unless option httpclose is used?
  3. I have sample configuration running with option http-server-close and without option httpclose set.

I observe the following at haproxy side:

Request comes:

GET /<some-url> HTTP/1.1
Host: host.pp.ru
User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.2.2) Gecko/20100326 Firefox/3.6.2 Accept: */*

Accept-Language: en-us,ru;q=0.7,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive

So client requests keep-alive. I suppose that haproxy should send request to backend with Connection: close (because http-server-close is set) but send response to client with keep-alive enabled. But that does not happen:

HTTP/1.1 200 OK
Date: Thu, 08 Apr 2010 08:41:52 GMT
Expires: Thu, 08 Apr 2010 08:42:52 GMT
Content-Type: text/javascript; charset=utf-8 Connection: Close

jsonp1270715696732(["a", ["ab", "and", "a2", "ac", "are", "a a", "ad", "a b", "a1", "about"]])

Why haproxy responds to client with Connection: Close?

Thanks in advance! Received on 2010/04/08 11:44

This archive was generated by hypermail 2.2.0 : 2010/04/08 12:00 CEST