Kubernetes and Cloud Native Associate (KCNA)Cloud Native ArchitectureHard
A development team is designing a new microservices application where each service is deployed in its own container. They want to ensure that new deployments of a service can be tested with a small percentage of live traffic before fully rolling out to all users, allowing for quick rollback if issues are detected. Which deployment strategy is most appropriate for this scenario?
- ARecreate Deployment
- BBlue/Green Deployment
- CRolling Update
- DCanary Deployment
Show answer & explanationAnswer & explanation
Correct answer: D. Canary Deployment
Canary deployment involves releasing a new version to a small subset of users first. This allows for testing with live traffic and monitoring for issues before a full rollout, providing a safe mechanism for quick rollback if problems occur.
Why the other options are wrong
- A. Recreate deployment involves tearing down all old instances and then bringing up new ones, leading to downtime.
- B. Blue/Green deployment runs two identical environments (old and new) and switches traffic entirely, but doesn't allow for gradual traffic shifting.
- C. Rolling update gradually replaces instances of the old version with the new one, but doesn't specifically control a small percentage of traffic for testing.
Canary Deployment
A deployment strategy where a new version of an application (the 'canary') is released to a small subset of users or servers first, then monitored. If successful, it's rolled out to the entire infrastructure; otherwise, it's rolled back.
- Gradual rollout to a small user base.
- Allows testing with live traffic.
- Enables quick rollback if issues arise.
- Minimizes risk of widespread impact.
Memory trick: Deploy smart: recreate, roll, canary, or blue/green.