All posts

Your Rollback Trigger Is a Fixed Threshold. It Should Be an Error Budget.

·5 min read·
error budgetsautomated rollbackSRE

Almost everyone who has automated deployment rollback did the same thing to configure it. They picked a number. "Roll back if the error rate exceeds one percent." "Abort if p99 latency crosses 400ms." The number felt defensible in the meeting where it was chosen, got committed to a YAML file, and has not been looked at since. It is now load-bearing infrastructure that nobody remembers the reasoning behind, and it is almost certainly wrong — not because someone chose badly, but because a single fixed threshold cannot be right for the thing it's being asked to guard.

I want to make the case that automatic rollback on error rate spike in production is the correct instinct wired to the wrong trigger. The signal you actually want isn't an absolute error rate. It's how fast a change is spending something you've already decided is scarce: your error budget. Error budget based rollback triggers are what SRE teams have been missing, and the reason they've been missing is that until recently the tooling couldn't act on them fast enough to matter.

Why the fixed threshold fails in both directions

A global rollback threshold has to be simultaneously tight enough to catch real regressions and loose enough not to fire on noise. There is no number that does both, because "real regression" isn't a property of the error rate. It's a property of the surface the errors are landing on.

Consider two services behind the same threshold. One renders avatar thumbnails; the other processes payments. A 0.4% error rate on the thumbnail service is a rounding error — some CDN timeouts, a few oversized uploads, nothing anyone should be woken up for. A 0.4% error rate on the payment path means one in every 250 customers just failed to give you money, and it is a five-alarm fire. Set your threshold at 1% and you'll never catch the payment regression until it's catastrophic. Set it at 0.2% and the thumbnail service will roll itself back every afternoon when traffic gets noisy, training everyone to ignore the automation entirely.

The same problem shows up across traffic volumes. A low-traffic internal endpoint serving 50 requests a minute will cross any percentage threshold on statistical noise alone — three failures in a minute is 6%, and it means nothing. A high-traffic endpoint can hide a serious regression well under the threshold because the denominator is enormous. The threshold that protects one is a false-alarm generator for the other. Teams "solve" this by maintaining per-service threshold tables, which rot the moment traffic patterns shift, and which nobody updates because updating them is invisible work with no reward.

The error budget already encodes what you're trying to say

Here's the thing that makes this frustrating: most of these teams have already done the hard work of expressing how much failure each surface can tolerate. It's called the SLO, and the room it leaves — the gap between your target and 100% — is the error budget. The payment path has a tight SLO because failures there are expensive. The thumbnail service has a loose one because they aren't. That difference is exactly the information a fixed threshold throws away.

SRE teams typically use the error budget for two things: gating releases when the budget is exhausted, and prioritizing reliability work in blameless retrospectives. Both are backward-looking and slow-moving. The move almost nobody makes is wiring the error budget directly into the rollback trigger, in real time, so the question the automation asks isn't "is the error rate above X?" but "is this change burning error budget faster than we can afford?"

That reframes everything. Burn rate is the signal. A change that would consume a week of budget in an hour should roll back immediately, even if the absolute error rate looks unalarming, because the trajectory is fatal. A change nibbling harmlessly at a service with plenty of budget to spare can be left alone through a blip that a fixed threshold would have panicked over. Multi-window burn-rate alerting — a fast window to catch acute regressions and a slow window to catch the quiet ones — is already standard practice for paging humans. Error budget based rollback triggers for SRE teams are just that same math pointed at an actuator instead of a pager.

Budget-relative triggers only work if rollback is instant

There's a reason teams settled for crude thresholds instead of doing this, and it isn't ignorance. It's that a more sensitive trigger is worthless if your response to it is slow. Burn-rate-based triggers fire earlier and more often than blunt thresholds — that's the point, you're catching regressions while the budget damage is still small. But catching a regression early only helps if you can act on it early. If your rollback is a fifteen-minute redeploy through the CI pipeline, a trigger that fires two minutes into a bad rollout just means you get to watch the budget drain for thirteen more minutes while the deploy churns.

This is why error budgets and feature flag rollback belong in the same sentence. Instant feature flag rollback without redeployment turns the flip from a fifteen-minute operation into a sub-second one, which is what makes an early, sensitive trigger actionable rather than merely informative. Your mean time to recovery stops being dominated by pipeline latency and starts being dominated by detection latency — which is the only place worth spending it. A budget-based trigger and a flag-based actuator are two halves of the same mechanism; neither is much use without the other.

Which change is spending the budget?

The last piece is attribution. A global service SLO tells you the service is unhealthy. It does not tell you which of the six changes that deployed in the last hour is the one eating the budget, and rolling back all six is a blunt, expensive over-correction. To make budget-based triggers surgical, the budget has to be measured against a specific change under test — a canary cohort exposed to exactly one new behavior, compared against the control. Statistical tooling like a sequential probability ratio test can tell you whether the difference between cohorts is a real regression rather than noise; the error budget tells you whether that real regression is one you can afford to keep. You need both. Detection answers "is this different?" The budget answers "does the difference matter enough to pull the change?"

That combination — a flag per risky change, a cohort to measure it against, a trigger tuned to the affected surface's budget rather than a global number, and a flip fast enough to act on — is the shape of rollback that actually protects you. It's also, not coincidentally, the shape of the system DeployRamp is built to be. When a risky change lands, it goes out behind a flag automatically, ramps under monitoring scoped to the surface it touches, and rolls back when the change is burning budget faster than that surface can tolerate — not when it crosses a number someone guessed at in a meeting a year ago. The error budget was always the right way to say how much failure you could live with. The only thing missing was a trigger that listened to it, and an actuator quick enough to obey.

Let DeployRamp handle the flags

Install the GitHub App, drop in the SDK, and ship a flagged PR in minutes. Book a demo and we'll show you how.

We use cookies to analyze site usage and improve your experience.