
In this article, we’ll look at some of the most common deployment strategies used in DevOps and cloud-native environments by startups and big companies
When deploying a new version of an application, the goal is not just to “push code to production.” The real goal is to release changes safely, reduce downtime, protect users from bugs, and make rollback easier when something goes wrong.
This is where deployment strategies come in. A deployment strategy defines how a new version of an application is released to users. Different strategies are useful depending on the size of the application, the risk involved, the available infrastructure, and how much control you need over the release process.
ROLLING DEPLOYMENT (most popular)
In this strategy, we deploy gradually to the servers. Full system downtime is never experienced by the users. Rolling deployment is like a marathon, The system is incrementally updated overtime.
You can see how the deployment moves from one to another server once we’re satisfied with the behaviour of the new version.
New version gradually replaces the old one
A slower process
Prevents downtime
Does not support targeted rollouts as we can’t control which users gets the new version during the rollout.
New version can be directed to specific users based on location etc.
BLUE-GREEN DEPLOYMENT
In blue-green strategy, we maintain two identical production servers and each side popularly named BLUE and GREEN (But there's a small catch)
This strategy typically allows for reliable rollback (Switching back traffic to the previous version (blue) if users encounter any issues in the new version.
THE CATCH
Resource intensive; Requires maintaining two identical prod-environment. Both prod-environment must be synchronized seamlessly while they run in parallel as it is being prepared for the switch.
Higher cost.
CANARY DEPLOYMENT
In this one we release to a small subset or % of users first, test safely and monitor for performance before full rollout.
For context, we can deploy or release new updates to:
A single server
Small cluster
Particular Geographical location
and more.
Canary allows targeted rollouts unlike the other two and usually not standalone i.e combined with Rolling deployment.
Comments (0)
Join the discussion by logging into your account.