fbpx
deployment

Deployment method: Rolling with additional batches

Rolling with additional batches it is a deployment strategy used when available servers can not respond to incoming traffic because of high load while other servers are updated during deployment. The solution is to create an additional number of servers available only during deployment process, those servers being in charge of processing incoming traffic and will be removed after deployment. This way, there will be no downtime during deployment and all traffic will be handled as expected.

To review some of load balancer concepts please visit this page.

How it works

Let’s consider this as our initial phase:

Rolling with additional batches deploy

In our example we are using a load balancer with 3 servers. Let’s consider the additional batch number 2 (2 servers will be created for deployment)

Step 1 is to create another 2 servers with the same code version as the other ones, available in load balancer. This is called extra provisioning.

Rolling with additional batches deployStep 2 is to remove 2 servers (the additional batch size) from load balancer taking into account the connection draining. So it will wait until all requests are processed and only after this they will be removed. A connection draining timeout can be used in order to wait a maximum of time after which the server is removed automatically

Rolling with additional batches deploy

Step 3: Update software on the servers disconnected from load balancer.

Rolling with additional batches deploy

Step 4: Reconnect servers to load balancer after deployment is complete

Rolling with additional batches deploy

Step 5:  wait for connection draining,  be it for one server or a batch number of servers less or equal to the additional batch size. After this, the server will be removed from load balancer.

Rolling with additional batches deploy

Step 6: Update server with new software

Rolling with additional batches deploy

Step 7: Reconnect server to load balancer

Rolling with additional batches deployment

Step 8 Wait for connection draining for additional servers, then remove them from load balancer

Rolling with additional batches deployment

Step 9 Destroy additional servers

Rolling with additional batches deployment

When should you use this method:

This is good alternative for rolling deployment strategy with the advantage of  keeping the same capacity to handle all incoming transactions.

Also, it can be used when you need fast discovery of system fails with new software installed.

Cons

  • Both versions of software will run in production at the same time.
  • Ensure backwards compatibility for all shared resources between old software and new software (databases, cache etc.).
  • Creating and removing new servers and resources may introduce some new costs.

Pros

  • Fast detection of errors which implies executing rapid disaster-recovery procedure or rollback.
  • The same amount of servers handles the traffic, so there is no downtime.
  • The rollback can be done similarly, one batch at a time.

Observations

  • Monitoring, logs and health check are an essential part of the deployment as we can see how the new software behaves right after fist batch update. If something went wrong, then all we have to do is to update those servers with the old version of software.

Next >> “All At Once” Deployment Method

Credits to: 
Maria Chiris for artdesign and image graphics
Designed by Freepik

Spread the love

Leave a Reply