On 18 Mar 2016, at 03:03, Igor Cicimov <[email protected]<mailto:[email protected]>> wrote:
On Fri, Mar 18, 2016 at 10:38 AM, Chris Warren <[email protected]<mailto:[email protected]>> wrote: Hi, We use haproxy in an auto-scaling environment. On an auto-scaling event, the haproxy configuration is rewritten to list all existing servers for each proxied service. A graceful reload is then performed. The issue is that by default haproxy assumes a server is UP (going down) until the first healthcheck tells it otherwise. If one of the servers for a proxy/backend is not yet actually healthy (e.g. in the initial moments after a new instance is booted), then some requests will be forwarded to the new instance, resulting in 503 responses. I use "slowstart 60s" to give the new instance enough time to boot up before HAP starts the health checks. Not sure though if I understood your issue correctly. Thanks Igor, We tried slowstart, but unfortunately it doesn’t seem to be applied to servers when haproxy starts (the docs agree). I also double-checked the code - and unless I’m missing something, slowstart only applies when an instance is in SRV_ST_STARTING state (http://git.haproxy.org/?p=haproxy-1.6.git;a=blob;f=src/queue.c;h=1f27c498b0a08cafee61e816dada2f4dc1a425f7;hb=HEAD#l53) but new instances on startup default to SRV_ST_RUNNING (http://git.haproxy.org/?p=haproxy-1.6.git;a=blob;f=src/server.c;h=4891d2dcda049b3fb4317d09c5f2e4362cb9bbe9;hb=HEAD#l899) until the first check is performed. Thanks again, Chris

