Skip to content

Lesson 7 of 9 · 24m

Release Risk and Progressive Delivery Under an Error Budget

Use canaries, feature flags, rollback discipline, and budget-aware release policy to ship change without concentrating avoidable risk.

Most outages are not caused by cosmic rays. They are caused by change: deploys, migrations, configuration updates, certificate rotations, feature flags, dependency upgrades, and humans doing reasonable things in a hurry. SRE does not oppose change. It shapes change so failure is small, detected quickly, and reversible. Progressive delivery is the practical mechanism.

Separate deployment from release

A deployment puts code in production. A release exposes behavior to users. Feature flags let you decouple them:

deploy new build       low user exposure if flag is off
enable staff, then 1%  validate with representative behavior
expand or disable      control blast radius without redeploying

This separation is powerful, but flags are not magic. Every flag adds a state dimension. Old flags become invisible configuration debt, and poorly scoped flags can create combinatorial behavior nobody tests.

Canaries need a real gate

A canary is not merely "deploy to one server and vibe." Define the measurements, the comparison window, and the automatic response. An Argo Rollouts analysis template can express that gate:

apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
  name: checkout-error-gate
spec:
  metrics:
  - name: error-rate
    interval: 1m
    failureLimit: 2
    provider:
      prometheus:
        address: http://prometheus.monitoring:9090
        query: sum(rate(http_requests_total{service="checkout",code=~"5.."}[2m])) / sum(rate(http_requests_total{service="checkout"}[2m]))

Rollback is a property you design

"Just roll back" assumes the old version can safely coexist with everything the new version touched. Database migrations are the classic trap. If the new schema drops a column old code needs, rollback reintroduces the incident. Safer migrations are often expand-and-contract:

1. add nullable column or table
2. deploy code that writes both shapes
3. backfill and verify
4. deploy code that reads the new shape
5. remove the old shape later, after rollback window closes

That is slower. It is also why mature teams treat migration design as release engineering, not as a database afterthought.

Use the error budget as release policy

Error budgets turn release risk from a religious argument into a shared constraint. When budget is healthy, the team can accept more experimentation. When budget is nearly exhausted, tighten blast radius and pause discretionary risky launches. The point is not punishment. The point is that reliability debt has a visible balance.

Field notes

  • A canary without meaningful traffic is a demo, not evidence.
  • Do not gate only on server metrics. Include business or journey-level checks when possible: successful checkout, message delivery, job completion.
  • Feature-flag evaluation order and caching can make rollback slower than expected; test the disable path.
  • Automatic rollback on every metric twitch trains people to ignore gates.

Was this lesson helpful?

Sign in to rate