Re: HTTP Request still gets response from the server with weight 0 and src persistence

2013-05-29 Thread Godbach
Hi Baptiste Thanks for your replying. I am using the balance roundrobin algorithm and sticking on src, not the the balance source algorithm. The configuration has been presented in my first mail as below: backend pool balance roundrobin. stick-table type ip

Re: HTTP Request still gets response from the server with weight 0 and src persistence

2013-05-29 Thread Baptiste
AH, sorry, my mistake. I read your mail too quickly. Baptiste On Wed, May 29, 2013 at 9:18 AM, Godbach nylzhao...@gmail.com wrote: Hi Baptiste Thanks for your replying. I am using the balance roundrobin algorithm and sticking on src, not the the balance source algorithm. The configuration

Re: HTTP Request still gets response from the server with weight 0 and src persistence

2013-05-29 Thread Godbach
Hi Baptiste It doesn't matter. :-) When the weight of server is set to 0 with the balance roundrobin algorithm, srv-eweight is update to 0 and fwrr_update_server_weight() (lb_fwrr.c) will be called as below: static void fwrr_update_server_weight(struct server *srv) { ... old_state

Re: HTTP Request still gets response from the server with weight 0 and src persistence

2013-05-29 Thread Baptiste
Actually, this is the purpose of dropping a weight to 0: being able to maintain sticky sessions. If you want to shutdown rudely your server, preventing everybody to access it, use the disable keyword. Baptiste On Wed, May 29, 2013 at 5:55 PM, Godbach nylzhao...@gmail.com wrote: Hi Baptiste

Re: HTTP Request still gets response from the server with weight 0 and src persistence

2013-05-29 Thread Godbach
Hi Baptiste Yeah, I got it. Thank you very much for your explanation. Best Regards, Godbach Actually, this is the purpose of dropping a weight to 0: being able to maintain sticky sessions. If you want to shutdown rudely your server, preventing everybody to access it, use the disable keyword.

HTTP Request still gets response from the server with weight 0 and src persistence

2013-05-28 Thread Godbach
Hi, all It is expected that new http request will not get response from the server of which weight was changed to 0. It cannot work well with persistence on src but work well without the persistence in lastest snapshot. There are two servers in my backend, and persistence on src ip has been

Re: HTTP Request still gets response from the server with weight 0 and src persistence

2013-05-28 Thread Baptiste
Hi Godbach, Before reading HAProxy source code, it worths reading its configuration guide for the options you use. IE, the balance source algorithm would tell you that: This algorithm is static by default, which means that changing a server's weight on the fly will have no effect, but this can