Hello, I've found another difference - regarding "seamless server states", according to my testing using version 1.6.3 administrative state DRAIN is not preserved after a reload but set weight 0 is preserved. For my use case, using DRAIN seems the logical choice but because of the 2 issues that I have - state DRAIN is not preserved after a reload (this issue has a higher weight :) ) and state DRAIN is not highlighted blue in the stats page, I need to use set weight 0. Do you think these can be considered bugs and have a chance to be solved ?
Regards, Alex S On Wed, Jan 20, 2016 at 2:23 AM, Igor Cicimov < [email protected]> wrote: > Hi Baptiste, > > On Wed, Jan 20, 2016 at 11:08 AM, Baptiste <[email protected]> wrote: > >> On Sat, Jan 16, 2016 at 3:37 AM, Igor Cicimov >> <[email protected]> wrote: >> > >> > >> > On Sat, Jan 16, 2016 at 7:36 AM, Alex <[email protected]> wrote: >> >> >> >> Hello, >> >> >> >> I was testing haproxy version 1.6.3 and I am a bit confused regarding >> >> draining a server. >> >> >> >> According to the documentation: >> >> set server <backend>/<server> state [ ready | drain | maint ] >> >> [...] Setting the mode to "drain" only removes the server from load >> >> balancing but still allows it to be checked and to accept new >> persistent >> >> connections. >> >> >> >> set weight <backend>/<server> <weight>[%] >> >> [...] A typical usage of this command is to disable a server during an >> >> update by setting its weight to zero, then to enable it again after the >> >> update by setting it back to 100%. >> >> >> >> >> > >> > Well basically setting weight to 0 immediately disables the backend >> >> I disagree on this point. Your server will still receive requests with >> persistence. >> It is simply ejected from the load-balancing algorithm. >> Health checks are still performed. >> >> > If this is the case then there isn't any difference between drain and > disable in terms of maintenance. Setting the weight to 0 will still allow > the exiting sessions to go to the server and get disconnected when the > server restarts for update. > > > whereas draining stops any new connections going to the backend but the >> existing >> > sessions are allowed to continue until some time limit is reached, lets >> say >> > 15 minutes, after which the backend gets completely disabled. >> >> Drain perform the same as above. >> I guess checks are also still performed. >> >> > It is kinda >> > removing the backend from the load balancer forcefully vs gracefully >> > (allowing the existing sessions to finish). What method to use is >> really up >> > to you and your user case. >> > >> >> I think you misunderstand "drain" and "disable". Disable forces >> everybody to get routed to an other server for their next request. >> >> Baptiste >> > > > -- Alex S

