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%.


What I can see from my basic tests is that they behave the same with the
exception that if I set the weight to 0 the corresponding server line from
the stats page becomes blue and if I set state drain the line remains green
and the status changes to DRAIN.

Can you please tell me which of the above methods is the recommended one
and what are the differences, if any ?
Also, the server line from stats should become blue for status change to
DRAIN, or my test result is the expected behavior ?

Thank you,
-- 
Alex S

Reply via email to