Elastic Beanstalk rolling update timeout not honored

567 views Asked by At

I am trying to achieve zero down time redeploys on AWS elastic beanstalk.

I basically have two instances on my environment coupled with Jenkins for CI (Using Tomcat). What I am trying to achieve is each time I trigger a redeploy from Jenkins, only one instance of the environment is redeployed, then have a timeout to allow the new instance to load the application and then redeploy the second instance.

In order to achieve that timeout I am setting both the "Pause time" and "Command timeout" but unfortunately its if though this limit is not honored. The first instance is redeployed but after around 1 minute the second instance is redeployed regardless of the timeout value I set. Have anyone archived this? any insights on how to achieve it?

1

There are 1 answers

0
Shin On

"Pause Time" relates to environmental configuration made to instances. "Command timeouts" relates to commands executed to building the environment (for example if you've customised the container). Neither have anything to do with rolling application updates or zero downtime deployments. The documentation around this stuff is confusing and fragmented.

For zero downtime application deployments, AWS EB give you two options:

  1. Batch application updates
  2. Running two environments and cutting over

Option 1 feels like a lot less work but in my testing hasn't been truly zero downtime. There is a HARDCODED timeout value where traffic will be routed to instances after 1 minute regardless of whether the load balancer healthcheck passes or not.

But if you still want to go ahead then running two instances and setting a batch size of 50% or 1 should give you want you want.