Hi David, On Wed, Feb 02, 2011 at 05:42:20PM -0800, David Tosoff wrote: > Thanks Peres, > > I had tried that already. serv-close actually took my sites and games down to > a > crawl. > > I tried pretend keep-alives as well and removing httpclose all together; same > result; seems best with httpclose enabled. > > Any other Ideas/suggestions?
Before 1.4.9, combining http-server-close with pretend-keepalive could result in what you observed because the server sometimes did not send a close in the response, and the client thought it wanted to stay alive. But some servers also failed to send a content-length or transfer-encoding if they got a close, resulting in a stupid situation where the client has to wait for the server to actively close to detect the end. 1.4.9 fixed that but introduced a new similar issue when combining httpclose with pretend-keepalive. All those are fixed in latest -git which will soon be released as 1.4.11. Anyway, 1.4.10 with http-server-close + http-keepalive SHOULD be OK. Please tell us if you still get the issue with that version. > On another note, I notice that haproxy strips out/uncompresses any gzipping > the > server replies with. Could this be related? Yes, though it's not haproxy which strips it, it's that there was a bug in at least one server (tomcat) which decided that an HTTP/1.1 request with "Connection: close" was equivalent to an HTTP/1.0 request (which it is not). So due to this, it refrained from using transfer encoding which is needed to send compressed contents. This bug was reported to the tomcat team and fixed in latest version if I understood it right. This is what led us to implement the "pretend-keepalive" option. It's possible that other servers have the same bug though I don't have a list. Cheers, Willy