Re: bug report for haproxy 1.3.15

From: Willy Tarreau <w#1wt.eu>
Date: Mon, 5 May 2008 23:42:09 +0200


On Sat, May 03, 2008 at 04:45:30PM +0800, Hongyu wrote:
> I don't make myself clearly. Request for www.yyy.com suppose to go to
> 10.1.2.161(Server: I161) and for www.xxx.com should go to 10.1.1.151(Server:
> I151).
>
> ------------------
> without option httpclose
> haproxy debug message for 'cat t |nc -i 1 localhost 80'
>
> Using sepoll() as the polling mechanism.
> 00000000:vimg.accept(0004)=0005 from [127.0.0.1:29262]
> 00000000:vimg.clireq[0005:ffff]: HEAD /index.html HTTP/1.1
> 00000000:vimg.clihdr[0005:ffff]: HOST: www.xxx.com
> 00000000:BACKEND_1.srvrep[0005:0006]: HTTP/1.1 404 Not Found
> 00000000:BACKEND_1.srvhdr[0005:0006]: Content-Type: text/html
> 00000000:BACKEND_1.srvhdr[0005:0006]: Content-Length: 345
> 00000000:BACKEND_1.srvhdr[0005:0006]: Date: Sat, 03 May 2008 08:36:23 GMT
> 00000000:BACKEND_1.srvhdr[0005:0006]: Server: I151
> 00000000:BACKEND_1.srvcls[0005:0006]
> 00000000:BACKEND_1.clicls[0005:0006]
> 00000000:BACKEND_1.srvcls[0005:0006]
> 00000000:BACKEND_1.closed[0005:0006]
>
> ------
> with 'option httpclose'
> haproxy debug message for 'cat t |nc -i 1 localhost 80'
>
> Using sepoll() as the polling mechanism.
> 00000000:vimg.accept(0004)=0005 from [127.0.0.1:29314]
> 00000000:vimg.clireq[0005:ffff]: HEAD /index.html HTTP/1.1
> 00000000:vimg.clihdr[0005:ffff]: HOST: www.xxx.com
> 00000000:BACKEND_1.srvrep[0005:0006]: HTTP/1.1 404 Not Found
> 00000000:BACKEND_1.srvhdr[0005:0006]: Connection: close
> 00000000:BACKEND_1.srvhdr[0005:0006]: Content-Type: text/html
> 00000000:BACKEND_1.srvhdr[0005:0006]: Content-Length: 345
> 00000000:BACKEND_1.srvhdr[0005:0006]: Date: Sat, 03 May 2008 08:40:41 GMT
> 00000000:BACKEND_1.srvhdr[0005:0006]: Server: I151
> 00000000:BACKEND_1.clicls[0005:0006]
> 00000000:BACKEND_1.srvcls[0005:0006]
> 00000000:BACKEND_1.closed[0005:0006]
> 00000001:vimg.accept(0004)=0005 from [127.0.0.1:29330]
> 00000001:vimg.clireq[0005:ffff]: HEAD /index.html HTTP/1.1
> 00000001:vimg.clihdr[0005:ffff]: HOST: www.yyy.com
> 00000001:BACKEND_2.srvrep[0005:0006]: HTTP/1.1 404 Not Found
> 00000001:BACKEND_2.srvhdr[0005:0006]: Connection: close
> 00000001:BACKEND_2.srvhdr[0005:0006]: Content-Type: text/html
> 00000001:BACKEND_2.srvhdr[0005:0006]: Content-Length: 345
> 00000001:BACKEND_2.srvhdr[0005:0006]: Date: Sat, 03 May 2008 08:41:59 GMT
> 00000001:BACKEND_2.srvhdr[0005:0006]: Server: I161
> 00000001:BACKEND_2.srvcls[0005:0006]
> 00000001:BACKEND_2.clicls[0005:0006]
> 00000001:BACKEND_2.srvcls[0005:0006]
> 00000001:BACKEND_2.closed[0005:0006]
>
> ----
> The problem is:
> *Without 'option httpclose' haproxy will dispatch client's keepalive
> requests for different domains to the backend which is dispatched for the
> first request.*

This is expected and a known limitation. Haproxy does not support keepalive as of now, and limits its analysis to the first request of a session. More info in doc/configuration.txt:2.1.1 if you're interested.

Regards,
Willy Received on 2008/05/05 23:42

This archive was generated by hypermail 2.2.0 : 2008/05/05 23:45 CEST