Backend & systems·topic 9 of 13
Deployment, release and rollback
Shipping is a separate discipline from writing the code, and the vocabulary reflects it: nearly every term here exists to separate the act of moving bytes from the act of exposing behaviour.
Read in order · tick what you already know
- 01
you put the new build on the servers, which is a completely separate event from anybody actually using the new behaviour.
Deployment
- 02
you flip the flag and users start getting the new behaviour, on code that has already been running in production for a week.
Release
- 03
you replace the instances a few at a time, so for ten minutes half the fleet is on the old version and half on the new.
Rolling update
- 04
you ship in the middle of the afternoon and no request fails, because nothing is ever stopped while it is still serving.
Zero-downtime deployment
- 05
you stand up a complete second environment on the new version and switch all traffic to it at once.
Blue-green deployment
- 06
you send a copy of real production traffic at the new service and throw the responses away, just to see if it holds up.
Dark launch
- 07
you ship the code turned off, switch it on for yourself, then for one percent, then for everyone.
Feature flag
- 08
you leave the new version running on ten percent of traffic for an hour before proceeding, because some failures only show up slowly.
Bake time
- 09
the deploy broke something so you put the previous version back rather than trying to fix forward under pressure.
Rollback
- 10
you cannot go back because the migration already ran, so the only way out is to ship another change quickly.
Roll forward
- 11
you add the new column, write to both, backfill, switch reads, and only remove the old one in a later deploy.
Expand and contract
- 12
you change the load balancer by editing a file and opening a pull request, not by clicking around in a console.
Infrastructure as code
- 13
you never patch a running server; you build a new image and replace the instance entirely.
Immutable infrastructure
- 14
one instance behaves differently from the others and nobody can say what was changed on it by hand eight months ago.
Configuration drift
- 15
you get mutual TLS, retries and per-route traffic splitting without changing a line of application code, because a proxy sits next to each instance.
Service mesh