Software Deployment Strategies: How Companies deploy their applications ?
Have you ever wondered how our phones get software updates, one day you are scrolling through facebook and the next day you see some new features in the website, and the buttons look different. Well, below I have explained the different strategies which companies use to deploy their applications and release new upgrades.
What is a Software Release ?
Software release is the process of “shipping” a set of new features, bugfixes or software performance improvement strategies to the users. A software release can be a major version, hotfix version or a patch fix. When a software is released, it goes through several environments like :
Development →Test → Staging →Pre-Production →Production environments.
What is a Deployment Strategy ?
Deployment strategy is a method used by the DevOps teams to release a new version of their software, there are several methods available, one must take into consideration the downtime, traffic flows, and operational cost for each method chosen. Depending on the companies priorities and requirements one of the methods listed below can be chosen.
List of Deployment Strategies:
1 — Recreate Deployment
2 — Blue/Green Deployment
3 — Canary Release
4 — A/B Testing
5 — Ramped Deployment
6 — Rolling Deployment
7 — Shadow Deployment
Below lets look at each of these deployments in more detail:
Recreate Deployment:
In this method the developers completely shut down the Prod environment containing the old version of the software. The developers then deploy the new version of the software and reboot the environment. The users loose complete access to the application when the environment is shut down.
Advantage:
1 — This method is less expensive as there is no need of a load balancer to direct/manage traffic.
Disadvantages:
1 — This method is generally used when you would like to write the complete application ground up, and when the developers have no other choice.
2 — The users loose complete access when the production environment is shut down. The users must be kept aware of the new software deployment activity in advance.

Blue/Green Deployment:
In this method we have 2 Environments, a live Prod environment and a staging Prod Environment. We also have a load balancer that can direct traffic. When the new software is deployed the traffic is switched from the live to staging environment.
Advantages:
1 — Reduction in downtime because the Prod environment is always available.
2 — Ability to roll back to the older software version incase of problems in the new software version.
Disadvantage:
1 — It is costlier to maintain 2 environments.

Canary Release:
In this method the new version of the software is tested on a small set of users and then the number of users is slowly increased until all the users receive the new version of the software.
Advantages:
1 — There is continous software performance monitoring on the new software release stability.
2 — The devops engineers get a chance to roll back a release if the performance of the new software version does not meet its standards.
Disadvantage:
1 — It requires more effort and the software deployment cycle is longer.

A/B Testing:
In this method, the new version of the software is release along with the older version because it helps the developers compare the performance of the newer version over the older version, this type of deployment also helps the developers to test the user behavior on the newer features. The newer version is released to a small subset of users.
If the newer version of the software meets the acceptable standards then it is released to the entire user base.
Advantages:
1 — It is easier and less risky to test the newer version of the software on a small subset of users and then make the newer version to the entire user base.
2 — One can roll back the newer version if it does not meet the performance standards.
Disadvantage:
1 — This method of release requires a higher user/developer coordination.

Ramped Deployment
In this method, the instances containing the older version of the software is slowly and gradually replaced with the new software until all the instances have the newer software version.
Advantages:
1 — The process is gradual, thus it is less risky.
2 — No need to take the entire application down, so the application availability is higher.
Disadvantages:
1 — Rollback can be complicated.
2 — It requires more effort and the deployment cycle is longer.
3 — One need a high number of instances with the software at a given time.

Rolling Deployment:
This method is applicable for those applications deployed on containers. It is similar to the Ramped Deployment, however one replaces the Pods containing the older application version with the Pods containing the new application version.
Shadow Deployment:
In this method the newer version of the software is deployed along with the older version of the software, a copy of the user requests is then forked/copied and sent to the newer version of the software. Once the developers are confident on the performance of the newer software version with the user traffic it receives, then the traffic is completely switched to the newer version of the software.
Advantages:
1 — Developers can get a good feedback of the application of how the newer software version works in production.
2 — Higher application availability, because the entire application does not need to go down.
Disadvantage:
1 — It is complicated to set up and maintain this deployment strategy.

Conclusion:
We have thus learnt about the different deployment strategies, every strategy has its advantages and disadvantages, depending on the usecase the best strategy may vary. Having the knowledge about the different software deployment strategies can help the readers in choosing the appropriate strategy for your own usecase.
Reference:
1 — The Top Deployment Strategies Explained (testenvironmentmanagement.com)
Other Articles:
If you are interested to learn about aws services please look at my other articles:
2 — Amazon Web Services [AWS]: An Overview | by Shabarish PILKUN RAVI | Towards AWS
3 — Amazon Simple Storage Service S3, an Introduction | by Shabarish PILKUN RAVI | Towards AWS
DevOps and MlOps:
1 — Understanding DevOps and DevOps pipeline | by Shabarish PILKUN RAVI | Jul, 2022 | Medium
2 — Understanding MlOps and MlOps Pipeline | by Shabarish PILKUN RAVI | Aug, 2022 | Medium
If you are interested in deep learning and computer vision, refer below articles:
1 — OpenCV Background Subtraction and Music in Background of Video | by Shabarish PILKUN RAVI | Medium