A safe release limits the blast radius: a canary gives the new version to a small share of traffic, and a gradual rollout widens it in steps. Blue-green keeps two copies of production and switches traffic. Stop criteria, including business metrics, are agreed before the release. Rollback fits an unknown cause, fix-forward only a known cause when rolling back is risky. Migrations follow the expand/contract pattern.
Product Engineering · Safe releases
A release to everyone at once broke payments on Android. How do you make 2% of people suffer instead of all?
On Friday at 16:00 a new version was released to all traffic. By 16:20 complaints reached support: payment on Android returns an error. The rollback took an hour because the cause was investigated first. During that time everybody suffered. If only 2% of users had received the version, the failure would have been noticed in the metrics within minutes, and hundreds of people would have been affected, not tens of thousands. This lesson is about the techniques that limit the blast radius and about the "rollback or fix-forward" decision.
How it works and why. The main idea of safe releases is to limit the blast radius. Instead of "everyone at once" the new version is shown to a small part of the traffic, signals are watched, and only then it is widened. Pre-release testing cannot reproduce everything: real data, devices and load exist only in production. So part of the risk is moved to a controlled stage after the deploy, where a mistake is still cheap.
Canary. The new version runs next to the old one and receives a small percentage of traffic (1–5%). If the metrics are normal, the percentage grows; if not, the canary is switched off and only a small share of users suffers. The name comes from the canary in a coal mine;
Gradual rollout (staged / percentage). The same at the level of a feature or app: 1% → 10% → 50% → 100% with pauses for observation. App stores have staged release (the App Store phased release follows a fixed schedule, Google Play staged rollout uses a percentage you choose);
Blue-green. Two full copies of production: "blue" serves traffic, the new version is deployed and checked in "green". Then the traffic is switched over entirely. Rollback means switching back. The downside: double resources, and a shared database requires compatible migrations;
Dark launch. The feature is already deployed in production but not shown to users. Often it is fed real traffic invisibly to people: for example, requests are duplicated to a new service and the responses are compared without returning them. The aim differs from a flag that gradually opens a feature, although a flag can be a tool here too.
Gradual rollout with a check at every stage
Figure 1. Signals permit every move, not the calendar. A stop at a threshold happens automatically or by a clear rule.
Example: a rollout plan with entry criteria. The condition for all this is criteria set before the start: which metrics and which threshold values count as a signal to stop the rollout. These decisions are made before the release, not under the pressure of an incident:
Stage 1: 1% of traffic, 30 min -> watch the signals
Stage 2: 10% of traffic, 1 h
Stage 3: 50% of traffic, 2 h
Stage 4: 100%
Stop and roll back if, within the watch window:
- the 5xx share is above 1% (normal 0.2%)
- p95 response time is above 800 ms (normal 500 ms)
- successful payments are below 90% of the usual for this hour
- crashes exceed 0.5% of sessions
The thresholds here are illustrative: set them for your product.
Two principles are at work here. First, the thresholds are written before the release, so the decision to stop does not depend on an argument in the chat at 16:20. Second, the comparison is with the norm for this hour and day of the week, not with an abstract number, because on Friday evening behaviour differs from Tuesday morning. A small percentage has a price too: on 1% of traffic rare errors are barely visible, so a stage must last long enough and the metrics must have a sample from which something can be said.
A rollout plan without and with criteria
Typical
Stages 10%, then everyone.
Window none
Stop thresholds none
Compare with none
When something goes wrong, the decision to stop is made in a chat and by feel.
Better
Stages 1% → 10% → 50% → 100%.
Window 30 min, 1 h, 2 h.
Stop thresholds 5xx above 1%, p95 above 800 ms, successful payments below 90% of the norm.
Compare with The norm for this hour and day of the week.
The thresholds are illustrative and set per product, but they are written before the start.
Figure 2. The same release in two plans: the difference is in the fields filled in before the start.
Rollback or fix-forward? Rollback means returning the previous version: fast and predictable when the impact is serious and the cause is not obvious. Fix-forward means quickly releasing a fix: appropriate when the cause is known, the fix is small and rollback is risky (for example, a data migration already applied that is incompatible with the old code).
Two legitimate answers to an incident
Rollback
Return the previous version
When the impact is serious, the cause is unknown and the previous version is compatible with the current data. Fast and predictable.
Fix-forward
Quickly release a fix
When the cause is known and the fix is small, while rollback is risky because of data changes already applied.
Figure 3. The choice depends on the situation. The default rule: when unsure, roll back.
That is why migrations are made compatible, in three steps: expand / contract. First add the new, then switch over, and only later remove the old:
-- 1. expand: added a new column, the old code works unchangedALTERTABLE orders ADD COLUMN currency_code text;
-- 2. migrate: backfilled, the new code writes to both columnsUPDATE orders SET currency_code = currency WHERE currency_code ISNULL;
-- 3. contract: in a separate release, when the old code is goneALTERTABLE orders DROP COLUMN currency;
While steps 1-2 are in place, both versions of the code work and rollback is safe. Step 3 is done in a separate release, when the old code is nowhere left: after it the old version cannot be brought back. That is why "drop the column" and "ship the new version" must not be one release.
Limits and alternatives. A gradual rollout does not help if there are no metrics or they are not visible: without signals 1% only postpones the problem. It is weak for rare failures on small samples and for changes that cannot be shown to part of the people (a schema change, a shared cache). Blue-green is expensive and does not solve data incompatibility. In mobile apps an installed version cannot be rolled back, so flags and a kill switch that can be turned off without an update matter more there. And for small teams without infrastructure a canary can be replaced by a simple one: release first to internal users, then to a percentage behind a flag.
Common mistakes.
Releasing "to everyone at once" with no stop threshold.
Agreeing the stop criteria during the incident.
Comparing metrics with an abstract number, not with the norm for this hour and day of the week.
Merging a migration that drops the old with the new code in one release: rollback becomes impossible.
Considering blue-green safe when both environments share a database with an incompatible schema.
Looking only at technical signals and missing a drop in business metrics.
Check yourself
An hour after a 100% release a payment bug was noticed. A migration that dropped the old column has already run. Why may rollback not help and what now?
Answer
The old code version expects a column that no longer exists, so after the rollback it will break. If the fix is small and the cause is known, do a fix-forward. A lesson for the future: removing the old is a separate later step (expand/contract), when rollback is no longer needed.
A canary gets 2% of traffic, 5xx is normal, and payment conversion has dropped. Can the rollout be widened?
Answer
No. A release can produce no errors and still break the value, for example when a button is not displayed. Business metrics must be among the stop criteria next to the technical ones. The rollout is stopped and the cause is investigated.
Related lessons: “Feature flags: combinations, kill switch, cleanup”, “After the release: monitoring, feedback, blameless post-mortem”, “Bug or feature, risk by business impact, MVP”.
In an interview.Junior: A safe release limits the blast radius: a canary gives the new version to a small percentage of traffic, a gradual rollout widens it in steps, blue-green keeps two copies and switches traffic. If the metrics worsen, we roll back. Middle/Senior: We agree the stop criteria and thresholds before the release and take them from business metrics, not only technical ones. I choose rollback or fix-forward by the situation: rollback when unsure, fix-forward when the cause is known and rollback is risky. I make migrations by expand/contract so that rollback stays safe, and remember the limit: mobile apps have no rollback, so a kill switch is needed.
After the release: monitoring, feedback, blameless post-mortem
A release does not end with the deploy, because afterwards technical signals, business indicators and user reports each catch different failures. Metrics are viewed by platform and compared with the same time last week. After an incident a blameless post-mortem is held: causes in the system and action items with owners, without looking for someone to blame.
Product Engineering · Safe releases
The release went out at 17:00, the logs are clean, and at 9 am support is flooded with emails. What did we miss?
The deploy was successful, there are few errors in the logs and the technical dashboard is green. And the next morning support received three times more emails than usual, all about one thing: on small screens the pay button is not visible. Technical signals did not show it because nothing crashed: the button simply did not appear. A release does not end with the deploy. Some defects show up only on real data, devices and load, so QA looks at production as one more environment to observe. This approach is called shift-right.
How it works and why. Different signals catch different failures, and none is enough alone. Technical signals are fast and precise but see only what the system knows about a failure. Business indicators see silent breakage of value. User complaints catch what is in no metric, but arrive with a delay.
What each group of signals catches
Figure 1. A release without errors can still break value. So all three groups are watched.
Technical signals: the error rate (5xx), latency (p95/p99), app crashes, errors in client logs;
Business indicators: conversion, orders per hour, successful payments, sign-ups. A release may produce no errors and still break value (a button disappeared, a funnel step does not work). They are compared with the same time of the previous week to cut out seasonality;
User feedback: support tickets, app store reviews, social media mentions. A sharp rise of similar complaints after a release is a strong signal. They are grouped by topic, reproduced and an automated test is added so that the bug does not return;
Alerts and dashboards: useful only when the thresholds make sense; an alert that fires for no reason gets ignored.
Example: an alert a person can act on. A good alert answers four questions: when it fires, to whom, what to do next and who owns it. Without these it is noise:
Alert: payment success rate below 95% for more than 10 minutes
Usual value: 98-99% (illustrative numbers)
Who gets it: the on-call payments team
What to do: the "Payments" runbook; the kill switch is in the runbook
Alert owner: the payments team, reviewed once a quarter
In the opening example this was the weak spot: an alert on payment success existed, but the success rate did not drop: people who did not see the button never started a payment. The drop showed only in orders per hour by device, and there was no such alert. So after every incident the team reviews which alerts are needed and looks at metrics by platform, device, version and country, not only at the overall number.
Short checks in production. A short set of safe checks after the deploy (login, the home page, viewing a product) with a dedicated test account that does not spoil real data or distort metrics. Test data is marked so that it can be cut from reports. Payment in such a set is checked only in a way that is safe for real money (the provider's test mode, a dedicated test product), or not checked at all.
Blameless post-mortem. After an incident the team gathers not to find the guilty one but to understand why the system and the process allowed it. Structure: a timeline, the impact on users, root causes (often several), what worked well, action items with owners and deadlines (a test, an alert, a release checklist). An example of a shortened record (numbers are illustrative):
Incident: pay button not visible on small screens for ~16 h
Impact: ~3% of the day's orders were not created
Timeline: 17:00 release -> 09:00 spike in tickets -> 09:25
rollback -> 09:40 payment works
Causes (there are several):
1. the pay button was not shown on a small screen
2. there was no test for this screen size
3. there was no alert on orders per hour
What worked: the rollback by a ready instruction
Action items: a test for small screens (QA, by Friday),
an orders-per-hour alert (payments, by Friday), release checklist (QA)
Two questions after an incident
Wrong
Who is to blame?
People hide details to avoid harm. The causes stay unnoticed, and the mistake repeats.
Right
Why did the system allow it?
People share details honestly. A test, an alert or a checklist step appears that closes the gap.
Figure 2. Blameless does not mean "nobody answers". Accountability sits in action items with an owner and a deadline.
For QA it is a chance to ask: why did the test not find it and what should be added. In the example it is not "forgot to check" but a missing test for a small screen and a missing alert on order volume: these are process defects, and they can be fixed.
Limits and alternatives. Monitoring catches a problem after it has already touched people: it reduces the harm but does not replace testing before release. Too many alerts lead to "alert fatigue": they are ignored, and a real failure drowns. Business metrics have a delay and noise, so on low traffic a conclusion about a release after an hour is unreliable. User complaints are isolated and biased: they show a symptom, not the scale, so they are compared with data. And a post-mortem without completed action items is only a ritual: the next incident will show the same gap.
Common mistakes.
Considering a release finished after the deploy and not looking at production.
Looking only at technical signals and missing a drop in business metrics.
Setting up an alert without an owner and an instruction on what to do.
Looking for the guilty one in a post-mortem instead of causes in the system.
Writing action items without an owner and a deadline: they do not get done.
Running production checks with a real account or real money.
Check yourself
After a release 5xx and latency are normal, but there are 30% fewer orders per hour than at this time last Tuesday. What can it be and what do you do?
Answer
A silent breakage of value: the system does not crash, but a funnel step does not work (for example, a button is not displayed on some devices). I look at the funnel and the breakdown by platform and version, check support complaints, and reproduce the path on the problematic platform. If it is confirmed, I stop the rollout or roll back.
After an incident someone says at the post-mortem: "The tester missed this". How do you move the conversation in a constructive direction?
Answer
Rephrase it: why did the system and the process allow it. We look at why there was no test for this case, why the alert did not fire in time or did not exist, why code review did not notice. The result is action items with owners and deadlines (a test, an alert, a checklist step), not a guilty person.
In an interview.Junior: After a release I look at technical indicators (errors, latency, crashes), business indicators (conversion, payments) and user feedback. After the deploy a short set of safe checks with a test account can be run. Middle/Senior: I understand that a release without errors can break value, so I look at metrics by platform and compare with the same time last week. Alerts have an owner and an instruction. After an incident I run a blameless post-mortem: timeline, impact, causes, action items with owners and deadlines. The question is not "who is to blame" but "why did the system allow it" and "what to add: a test, an alert, a checklist".