Deployment
A new version is a risk. It may be slower, it may fail on a case nobody tried, and the only place where all of that is certain to show up is production. A deployment strategy decides how many users meet the risk before you know, how long it takes to undo, and what the fleet loses while the change is made. This module compares four ways of putting a new version on a fleet, and then looks at the two things a strategy cannot do for you: hide a feature behind a switch, and change a database that two versions share.
You will run all four strategies on the same traffic with a release that is worse than the one it replaces, and read the users hit, the time to notice, the time to undo, the capacity lost and the extra instances paid for. You will also sort statements about images and containers, work through a six-step rename of a column, and answer a quiz.
The lessons
Section titled “The lessons”- Containers and images: what you actually deploy (16 min). An image is a fixed package and a container is a process started from it; why a deploy replaces containers, and what a start costs.
- Rolling deployments and zero downtime (22 min). All at once against a few instances at a time, surge against unavailable, and why zero downtime needs headroom.
- Blue/green and canary deployments (25 min). A second fleet and a switch, or a small share of the traffic first, and what each one costs and catches.
- Rollback: noticing a bad release and undoing it (22 min). Time to detect, time for a person to act, and time for the strategy to go back; false alarms and missed releases.
- Feature flags: deploying is not releasing (18 min). A setting that turns deployed code on or off, the kinds of toggle, and what flags cost.
- Zero-downtime schema changes: expand and contract (22 min). Why two versions of the code need a schema that suits both, and a six-step rename.
- Recap and quiz (12 min). The module in one page, a checklist for a release, and a quiz.
What you will be able to do
Section titled “What you will be able to do”- Say what a container image is, why it is deployed by digest, and what a new instance costs before it serves.
- Choose a batch size and rolling mode that keep the capacity above the traffic, and say what it costs in time or in instances.
- Compare blue/green and a canary on users hit, rollback time and extra instances, and say when a canary cannot see a problem.
- Split a bad release’s exposure into detection, decision and mechanism, and say when a rollback is not safe.
- Put a risky change behind a flag with a safe default, and change a schema in expand, migrate and contract steps.
All the numbers in the lab are illustrative. They are for comparing choices, not for forecasting any real product.
Built by GhaziAlibi.
© ShardCraft. All rights reserved.