3

With an ELB setup, there as healthcheck timeout, e.g. take a server out of the LB if it fails X fail checks.

For a real zero down time deployment, I actually want to be able to avoid these extra 4-5 seconds of down time.

Is there a simple way to do that on the ops side, or does this needs to be in the level of the web server itself?

JAR.JAR.beans
  • 9,668
  • 4
  • 45
  • 57

1 Answers1

3

If you're doing continuous deployment you should deregister the instance you're deploying to from ELB (say, aws elb deregister-instances-from-load-balancer), wait for the current connections to drain, deploy you app and then register an instance with ELB.

http://docs.aws.amazon.com/cli/latest/reference/elb/deregister-instances-from-load-balancer.html http://docs.aws.amazon.com/cli/latest/reference/elb/register-instances-with-load-balancer.html

It is also a common strategy to deploy to another AutoScaling Group, then just switch ASG on the load balancer.

Sergey Kovalev
  • 9,110
  • 2
  • 28
  • 32
  • Thanks. I saw this one - https://github.com/opbeat/elb-dance - seems to makes this easier. My problem with this approach is that it really adds a complexity to the deployment flow. but if no other option comes up, i'll take this direction. – JAR.JAR.beans Apr 25 '17 at 09:07
  • It should be complex 'cause it's very customizable. For easy deployments there is AWS Beanstalk. – Sergey Kovalev Apr 26 '17 at 13:31
  • Worth noting that even with register/deregister, still seeing none 2xx responses over load. :( – JAR.JAR.beans Apr 27 '17 at 11:26