Deployment strategies

Deployment, a term that is a nightmare for many. Having a zero-downtime deployment is no more comfort rather it’s a necessity. As different firms came up with vivid ideas on how to deploy an application, here in this blog we will discuss a few strategies which are very much used in the market to deploy an application.

Rolling deployment

In this, each instance is replaced with a newly deployed instance, one by one. At any given point there are N+1 instances, till the deployment is completed, a new instance is created followed by killing an old instance. As each instance is replaced one by one, at the point of deployment the clients will be served by the old and the new application instances at the same time. While implementing this strategy it’s important to keep this point in mind and see if your application can handle this.

Zero downtime is achieved with this process. Rolling back is very simple as the instances are created linearly.

Blue-green deployment

A famous deployment model that is meant to achieve zero downtime. In this process, we deploy the new instances to a region say “Blue”, right now the traffic is served by the old region say “Green”. Now, we test the
instances in the blue region to see if the application is working as expected. If the blue region, is working as expected then we route the traffic to the blue region and destroy the instance in the green region.

For on-premise deployments, this will be a costly model as we have to maintain two regions. But for cloud deployments, the cost is minimal. Rolling back is very simple as the old infrastructure still exists until the new one is tested.

Canary deployment

A similar model like blue-green, except that the traffic is routed to a small set of users and then slowly releasing it to a large audience. Here in this process, a small set of new instances are deployed and a small subset of users are routed to the new instances. If the result is satisfactory, then we slowly increase the instances and the users routed. Once, everything looks good all the users are routed to the new instances and the old ones are destroyed.

Similar to blue-green this is not cost-effective for on-premise deployments as it uses additional infrastructure. Rolling back at any point is very easy, as the old infrastructure is not destroyed until we decide to.

A/B testing deployment

This is similar to Canary deployments, here we deploy the new instances and route a subset of traffic to the new instances. Using the monitoring tools, we monitor the new and the old instances and see if the new instances are achieving the goal they are meant to. If they do, then we route all the traffic to the new instances.

Zero downtime is achieved with this process. This is used mostly for testing out a new feature by the business. Rolling back at any point is very easy, as the old infrastructure is not destroyed until we decide to.

Based on the application, the use case of the deployment, tools used and cost, we decide on which process to be followed to deploy the application.

Peace out, good day 🙂

Published by Ritesh Kumar Reddy

I(Ritesh) work as a Sr. Cloud Engineer for a living. Learning new technologies has always been my hobby. Why not share it? Here is the brainchild – blogging to share the knowledge. This blog is for those who wish to start or already into the Cloud field. Each article briefly talks about a tool/technology that is used in the Cloud model. Once you read the article, I hope, you get a kick start regarding the specific tool/technology.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: