Deployment strategies

date
Mar 25, 2021
slug
deployment-strategies
status
Published
tags
operation
devops
summary
Deploying or upgrading services is risky. In this post, we explore risk mitigation strategies.
type
Post
๐Œ๐ฎ๐ฅ๐ญ๐ข-๐’๐ž๐ซ๐ฏ๐ข๐œ๐ž ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ๐ฆ๐ž๐ง๐ญ In this model, we deploy new changes to multiple services simultaneously. This approach is easy to implement. But since all the services are upgraded at the same time, it is hard to manage and test dependencies. Itโ€™s also hard to rollback safely
notion image
๐๐ฅ๐ฎ๐ž-๐†๐ซ๐ž๐ž๐ง ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ๐ฆ๐ž๐ง๐ญ With blue-green deployment, we have two identical environments: one is staging (blue) and the other is production (green). The staging environment is one version ahead of production. Once testing is done in the staging environment, user traffic is switched to the staging environment, and the staging becomes the production. This deployment strategy is simple to perform rollback, but having two identical production quality environments could be expensive.
notion image
๐‚๐š๐ง๐š๐ซ๐ฒ ๐ƒ๐ž๐ฉ๐ฅ๐จ๐ฒ๐ฆ๐ž๐ง๐ญ A canary deployment upgrades services gradually, each time to a subset of users. It is cheaper than blue-green deployment and easy to perform rollback. However, since there is no staging environment, we have to test on production. This process is more complicated because we need to monitor the canary while gradually migrating more and more users away from the old version.
notion image
๐€/๐ ๐“๐ž๐ฌ๐ญ In the A/B test, different versions of services run in production simultaneously. Each version runs an โ€œexperimentโ€ for a subset of users. A/B test is a cheap method to test new features in production. We need to control the deployment process in case some features are pushed to users by accident.
notion image

ยฉ 2021 - 2024 ยท Khanh Tran ยท ้ก”ใ‚จใƒณใ‚ธใƒณ ยท tran_khanh@outlook.com