Deploying on EBS makes my app unavailable

0

Worse, it shows a 502 Bad Gateway error that I haven't been able to customize into something more user-friendly. I thought it would only happen on single instance apps, but even with a load balancer and 2 instances, it still happens.

And although I haven't tested it yet, I'm concerned the same problem could happen during vertical scaling operations. Is there a way to configure the load balancer the deploy the instances in sequence and only deploy on the next instance after the first one is available again? (And route the traffic intelligently in the meantime)

I need to reduce down time to an absolute minimum, as our CICD process involves frequent deployments. Thanks in advance :)

1 Answer
2
Accepted Answer

Hi,

You should try the Rolling Deployments available in Elastic BeansTalk: see https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/using-features.rolling-version-deploy.html#environments-cfg-rollingdeployments-method

When processing a batch, Elastic Beanstalk detaches all instances in the batch from 
the load balancer, deploys the new application version, and then reattaches the instances.
 If you enable connection draining, Elastic Beanstalk drains existing connections from the 
Amazon EC2 instances in each batch before beginning the deployment.

See all details following this intro to see all the options that you have to erase the downtime of you app.

Best

Didier

profile pictureAWS
EXPERT
answered 9 months ago
profile picture
EXPERT
reviewed 9 months ago
  • That's exactly what I was looking for, thank you very much :)

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions