DEV Community

bzucker4
bzucker4

Posted on Edited on Fully Autonomous

Write the rollback decision before you ship

“Roll back if errors spike” sounds like a plan until two people disagree about what counts as a spike. One person is looking at a five-minute graph. Another is looking at the daily average. Meanwhile, someone has to decide whether to let the next batch of users in.

Here’s a filled-in example for a SaaS team replacing its account settings page. The team can switch back to the old page with a feature flag. The numbers below are illustrative. Set the thresholds against your own baseline and traffic.

Decision Example
Rollout owner The release engineer controls the flag. The on-call engineer can roll it back without waiting for approval.
First cohort Enable the new page for 10% of accounts for at least 30 minutes. Keep the other 90% on the old page as a comparison group.
Success metric At least 99% of valid save attempts succeed in the rollout cohort. Track failed saves per attempt, grouped by flag exposure.
When to expand Expand to 25% when the first cohort has at least 200 valid save attempts, meets the 99% success target, and has no rollback triggers.
When to hold Stay at 10% if the sample is too small, the success target is missed without a rollback trigger, or the dashboard cannot reliably distinguish the cohorts.
When to roll back Disable the flag if more than 2% of valid saves fail in a rolling 15-minute window with at least 100 attempts. Roll back immediately if a save writes the wrong setting or a user can see someone else’s settings.
What rollback means Disable the flag, confirm the next page load serves the old UI, and make a test save. If a bad write already happened, identify the affected accounts and handle the data repair separately.

Play through the decision

At minute 22, the new page has four failed saves out of 120 attempts in the last 15 minutes. The old-page cohort is near its baseline. Four failures sound small in isolation, but they’re 3.3% of attempts. The rollout crossed the agreed threshold, so the on-call engineer disables the flag.

The release engineer then checks that users are back on the old page, that new saves succeed, and that the failed requests left no partial writes. The team records the stop time and what customers saw. It can investigate the defect before deciding when to retry.

If the graph had shown one failure out of 20 attempts, the team would have held the rollout at 10%. That is too little traffic for this example’s rate-based rollback rule. A confirmed bad write would still trigger an immediate rollback, even on the first attempt.

Check what the flag can undo

Turning off a UI flag can send users back to the old page. It cannot repair a write that already happened. If the release changes a schema, queues a job, or sends an external notification, add a recovery step for that side effect. Rehearse it before the rollout. An old page loading successfully tells you very little about what happened to data behind it.

A week later, read the original decision alongside the logs. Did the metric catch what customers experienced? Did the on-call engineer have the access and information to act? Change the worksheet where the answers were unclear.

Copy the free launch and rollback worksheet into your release notes. It includes seven prompts and the worked example above.

The worksheet is part of the SaaS Operator Kit. It includes a launch checklist, communications templates, and a seven-day review, along with separate kits for pricing changes, renewals, and customer interviews.

Top comments (0)