Srdan Dukic
2010-05-24 23:00:36 UTC
Hi,
I've setup HAProxy (version 1.3.15.2 from repo's) on Debian to load balance
requests to a bunch of Windows web services running on IIS7. My problem is
that after load testing the system, Windows runs out of sockets as they all
end up in the TCP TIME_WAIT state. (Nice explanation of this TCP state found
here:
http://blog.zhuzhaoyuan.com/2009/03/a-word-on-time_wait-and-close_wait/)
When removing the load balancer and having the requests go directly to the
web server there are only a maximum of 10 sockets in the TIME_WAIT state at
any one time.
It seems like there's some error in communication between HAProxy and
Windows/IIS7 where the sockets aren't closed properly. I've tried adding the
"httpclose" option but the problem remained. Has anyone had this problem
before? My haproxy.cfg is as below:
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 40960
#chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen webfarm 192.168.17.150:80
mode http
stats enable
stats auth admin:admin
balance roundrobin
option httpchk
option httpclose
http-check disable-on-404
server dn1 192.168.17.136 check
server dn2 192.168.17.137 check
server dn3 192.168.17.138 check
Thank you
I've setup HAProxy (version 1.3.15.2 from repo's) on Debian to load balance
requests to a bunch of Windows web services running on IIS7. My problem is
that after load testing the system, Windows runs out of sockets as they all
end up in the TCP TIME_WAIT state. (Nice explanation of this TCP state found
here:
http://blog.zhuzhaoyuan.com/2009/03/a-word-on-time_wait-and-close_wait/)
When removing the load balancer and having the requests go directly to the
web server there are only a maximum of 10 sockets in the TIME_WAIT state at
any one time.
It seems like there's some error in communication between HAProxy and
Windows/IIS7 where the sockets aren't closed properly. I've tried adding the
"httpclose" option but the problem remained. Has anyone had this problem
before? My haproxy.cfg is as below:
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 40960
#chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 5000
clitimeout 50000
srvtimeout 50000
listen webfarm 192.168.17.150:80
mode http
stats enable
stats auth admin:admin
balance roundrobin
option httpchk
option httpclose
http-check disable-on-404
server dn1 192.168.17.136 check
server dn2 192.168.17.137 check
server dn3 192.168.17.138 check
Thank you
--
SrÄan ÄukiÄ
SrÄan ÄukiÄ