Explain Canary deployments/rollouts in detail
Answer
Canary deployment steps:
- Traffic coming from users through a load balancer to the application which is currently version 1
Users -> Load Balancer -> App Version 1
- A new application version 2 is deployed (while version 1 still running) and part of the traffic is redirected to the new version
Users -> Load Balancer ->(95% of the traffic) App Version 1 ->(5% of the traffic) App Version 2
- If the new version (2) runs well, more traffic is redirected to it
Users -> Load Balancer ->(70% of the traffic) App Version 1 ->(30% of the traffic) App Version 2
- If everything runs well, at some point all traffic is redirected to the new version
Users -> Load Balancer -> App Version 2
Pros:
- If there is any issue with the new deployed app version, only some portion of the users affected, instead of all of them Cons:
- Testing of new version is neccesrialy in the production environment (as the user traffic is exists only there)