> On 29 Mar 2016, at 18:22, Paul Draper <[email protected]> wrote: > > As I understand it, there seems to no way to add a server to HAProxy without > incurring significant disruption. Adding a server requires reloading > configuration. This loses all statistics, all health check information, etc. > So, for instance, after adding a server, HAProxy will send traffic to > unhealthy servers.
1.6.x's server-state-file feature helps haproxy reloads be a lot less disruptive (stats and state are maintained across reoads). We've started using a patch which adds an "initial-state up/down" option to each server line (or to the default) to stop any new servers getting traffic directed at them before the first healthcheck: https://github.com/beamly/haproxy-1.6/commit/9e7ad68a0c6582a38591eb27626fdb31bb5f8c18 For scaling-down/removing instances we also use "option redispatch" so any requests sent to backends which are shutting down (but not yet failed a healthcheck) get resent to a good server. This seems to give us the behaviour we require in an autoscaled environment.

