Compare Blue/Green Deployment with Canary Deployment for ML models. Which one is safer for major updates?
Python interview question for Advanced practice.
Answer
Blue/Green Deployment: Maintains two identical environments (Blue=Live, Green=New). You deploy the new model to Green, test it, and then switch 100% of traffic from Blue to Green instantly. Rollback is easy (switch back), but if Green fails, all users are affected immediately. Canary Deployment: Rolls out the new model to a small subset of users (e.g., 5%) first. If metrics look good, traffic is gradually increased to 100%. Safety: Canary is safer for major updates because it limits the blast radius of a bad model to a small percentage of users.
Explanation
Canary deployment is named after 'canary in a coal mine'.