Cyril et al. Just to confirm after further testing this is definitely to do with keep-alive from browsers not closing the current connection to a keep-alive server. So if you set a server to maintenance mode connections will effectively be drained (which is normally a good thing). It would be nice to have the option of killing the connections instantly as well though i.e. drain or kill (especially for things like RDP/Exchange etc.) Thanks.
On 22 February 2011 18:01, Cyril Bonté <[email protected]> wrote: > > Hi Malcolm, > > Le mardi 22 février 2011 12:06:47, Malcolm Turnbull a écrit : > > Just a small issue with the stick-table feature, with the following > > example config: > > > > listen L7vip 192.168.2.60:80 > > mode tcp > > balance leastconn > > stick-table type ip size 10240k expire 30m > > stick on src > > server rip1 192.168.2.26:80 weight 1 check inter 2000 rise 2 fall 3 > > server rip2 192.168.2.111:80 weight 1 check inter 2000 rise 2 fall 3 > > > > Works great, but if you put one of the bakend servers in maintenance > > mode or set the weight to 0 > > > > echo "set weight L7vip/rip2 0" | socat unix-connect:/var/run/haproxy.stat > > stdio echo "disable server L7vip/rip2 0" | socat > > unix-connect:/var/run/haproxy.stat stdio > > (should be "disable server L7vip/rip2") > > > Nothing happens - Or rather the persistence template still takes > > effect like option persist.... > > This is not what I observe when using "disable server". Next requests are sent > to the other backend as soon as I disable the first one. > > Here are some logs to illustrate : > Feb 22 18:43:39 localhost haproxy[3078]: Proxy L7vip started. > Feb 22 18:43:49 localhost haproxy[3078]: 127.0.0.1:47927 > [22/Feb/2011:18:43:49.656] L7vip L7vip/rip1 0/0/2 460 -- 0/0/0/0/0 0/0 > Feb 22 18:43:50 localhost haproxy[3078]: 127.0.0.1:47930 > [22/Feb/2011:18:43:50.997] L7vip L7vip/rip1 0/0/1 460 -- 0/0/0/0/0 0/0 > Feb 22 18:43:51 localhost haproxy[3078]: 127.0.0.1:47933 > [22/Feb/2011:18:43:51.804] L7vip L7vip/rip1 0/0/1 460 -- 0/0/0/0/0 0/0 > Feb 22 18:43:53 localhost haproxy[3078]: 127.0.0.1:47936 > [22/Feb/2011:18:43:53.153] L7vip L7vip/rip1 0/0/1 460 -- 0/0/0/0/0 0/0 > Feb 22 18:44:06 localhost haproxy[3078]: 127.0.0.1:47939 > [22/Feb/2011:18:44:06.312] L7vip L7vip/rip1 0/0/0 460 -- 0/0/0/0/0 0/0 > Feb 22 18:44:06 localhost haproxy[3078]: 127.0.0.1:47942 > [22/Feb/2011:18:44:06.929] L7vip L7vip/rip1 0/0/1 460 -- 0/0/0/0/0 0/0 > Feb 22 18:44:31 localhost haproxy[3078]: Server L7vip/rip1 is DOWN for > maintenance. > Feb 22 18:44:35 localhost haproxy[3078]: 127.0.0.1:47945 > [22/Feb/2011:18:44:35.124] L7vip L7vip/rip2 0/0/0 460 -- 0/0/0/0/0 0/0 > Feb 22 18:45:03 localhost haproxy[3078]: 127.0.0.1:47953 > [22/Feb/2011:18:45:03.889] L7vip L7vip/rip2 0/0/1 460 -- 0/0/0/0/0 0/0 > Feb 22 18:45:07 localhost haproxy[3078]: 127.0.0.1:47956 > [22/Feb/2011:18:45:07.589] L7vip L7vip/rip2 0/0/1 460 -- 0/0/0/0/0 0/0 > Feb 22 18:45:17 localhost haproxy[3078]: Server L7vip/rip1 is UP (leaving > maintenance). > Feb 22 18:45:21 localhost haproxy[3078]: 127.0.0.1:47960 > [22/Feb/2011:18:45:21.732] L7vip L7vip/rip2 0/0/0 460 -- 0/0/0/0/0 0/0 > Feb 22 18:45:27 localhost haproxy[3078]: 127.0.0.1:47963 > [22/Feb/2011:18:45:27.240] L7vip L7vip/rip2 0/0/0 460 -- 0/0/0/0/0 0/0 > > I see that your proxy is in TCP mode, can't it be due to a HTTP keep-alived > connection ? > > -- > Cyril Bonté -- Regards, Malcolm Turnbull. Loadbalancer.org Ltd. Phone: +44 (0)870 443 8779 http://www.loadbalancer.org/

