advanced33 min studyLesson 78 in Engineering

Dependency budgets and error budgets

Allocate end-to-end failure allowance across dependency paths and interpret burn rates without double-counting incidents or hiding cohorts.

On this page

What you’ll understand

  • Translate an end-to-end objective into a count-based failure allowance.
  • Calculate a burn rate and its approximate exhaustion horizon under constant conditions.
  • Allocate dependency risk while respecting overlap, conditional paths, and measurement boundaries.

An end-to-end objective cannot be achieved by asking every dependency to have the same percentage as the product. Required dependencies consume parts of the available failure allowance, and some failures overlap. Optional dependencies may affect only a cohort or degrade quality rather than availability. Budgeting makes these tradeoffs explicit: it connects architectural requirements, observed user outcomes, and decisions about change. This lesson extends basic SLO definitions into composition and attribution rather than treating a budget as permission to break the service.

Count outcomes at a consistent boundary

Choose the population of eligible original operations and define what counts as good. The denominator must not silently switch to successful requests, individual retry attempts, or only the traffic that reached a healthy backend. A count-based budget is the allowed bad fraction times eligible volume for the specified window. A time-based objective uses a different denominator and should not be mixed into the same arithmetic without a defined translation. For quality-sensitive AI features, a fast syntactically valid response may still fail the useful-outcome definition.

Inspect important cohorts as well as the aggregate. A small tenant population can experience severe failure while the global percentage remains within target. Define supported request classes, excluded conditions, and how partial responses are scored before incidents occur. Budget policies should name decision owners and actions, such as pausing a risky rollout while restoring reliability. They should also acknowledge that security fixes or urgent corrective changes may need a separate controlled process. An exhausted budget is evidence for a decision, not an automatic mechanical substitute for judgment.

B=N(1−S),rburn=eobserved1−SB=N(1-S),\qquad r_{\mathrm{burn}}=\frac{e_{\mathrm{observed}}}{1-S}
For a count-based objective S over N eligible original operations, B is allowed bad operations. Burn rate compares the observed bad fraction with the allowed fraction, using a compatible population and objective; it is dimensionless.↔ Scroll wide equations horizontally.

Compose dependencies without inventing independence

If a request requires several dependencies, each dependency's failure can make the operation bad. Without independence, the union bound says the total probability is no greater than the sum of those failure-event probabilities. An allocation whose sum fits the end-to-end allowance is therefore conservative for that modeled path, provided the events use the same operation population and include all relevant causes. Independent-product calculations can be more precise only when their assumptions are justified. Do not add overlapping incident counts and call the total distinct affected users.

An optional dependency used by only a fraction of operations should be weighted by that path's exposure and outcome semantics. For example, a recommendation outage may omit a panel without failing checkout; it can still consume a separately defined quality budget. Retries alter the relationship between dependency attempt failures and original-operation failures. Measure whether the user operation actually recovered before its deadline rather than charging every failed internal attempt directly to the product budget. Preserve dependency attribution as labels so overlapping causes remain analyzable.

Pr⁡ ⁣(⋃i=1mEi)≤∑i=1mPr⁡(Ei)\Pr\!\left(\bigcup_{i=1}^{m} E_i\right)\le\sum_{i=1}^{m}\Pr(E_i)
Ei are dependency-caused bad events on the same original-operation population. The union bound needs no independence, but omitted failure causes, different denominators, or quality effects outside the definition invalidate the allocation's interpretation.↔ Scroll wide equations horizontally.

Turn burn into a decision horizon

A burn rate of ten means the observed bad fraction is ten times the allowed fraction; it does not mean ten percent of the monthly budget has already been consumed. Under constant eligible-operation rate and constant burn, a full window's budget would be consumed in the window duration divided by burn. Actual remaining time also depends on budget already spent, traffic changes, and the rolling-window definition. Use multiple observation windows so a short burst and a persistent slow burn can both lead to appropriate investigation without identical alert behavior.

The probability lab shows exact binomial counts under independent identical trials. Set a success probability and trial count to examine the mean and variance, then explain why correlated outages violate the model. A deployment defect can cause a long run of failures rather than independent coin flips, and rare failures may be too sparsely sampled to support a precise estimate. Use the lab to distinguish expected counts from guarantees. Operational burn decisions must retain time structure, cohort exposure, and uncertainty from the actual service.

Allocate a count budget and interpret burn

A fictional API targets 99.9% good outcomes over 10 million eligible original operations in a 30-day window. Allocate 0.0003 failure probability to dependency A, 0.0002 to B, and 0.0005 to all remaining causes on the same required path. A later observation has a 0.5% bad fraction.

  1. The allowed fraction is 1 − 0.999 = 0.001, so the count budget is 10,000,000 × 0.001 = 10,000 bad operations.

  2. Allocated probabilities sum to 0.0003 + 0.0002 + 0.0005 = 0.001. The union bound fits the allowance without assuming independence, if all relevant failure events are included.

  3. Observed burn is 0.005/0.001 = 5. Under constant rate and burn, an initially unspent 30-day budget would be consumed in 30/5 = 6 days.

The result

The allocation is a conservative model, and six days is a conditional planning horizon. Actual budget accounting must use observed distinct bad original operations and the specified window.

Explore the model

Interactive lab

Interactive lab · probability

Expected failures are not an outage guarantee

Adjust success probability p and trial count n to inspect the exact binomial distribution, mean np, and variance np(1 − p). The bars assume independent identical trials and do not replay production incidents.

Expected failures are not an outage guaranteeThese are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Current readings: Mean · np: 5; Variance · np(1−p): 2.5; Total probability: 1. All parameters are adjustable with the labeled controls below.03581000.070.150.220.3Successes kP(X = k)k = 0 · P = 9.77e-4
Exact probabilityHighlighted outcomeMean np
Mean · np
5
Variance · np(1−p)
2.5
Total probability
1
t = 0 s

These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forCorrelated outage runs and changing request populations can invalidate a simple binomial budget estimate.

Check your understanding

A service with a 99.9% objective observes a 1% bad fraction on the same eligible-operation population. What is its burn rate?

Try it yourself

An API targets 99.95% good outcomes over 4 million eligible operations. It observes a 0.2% bad fraction in a recent window. Compute the total count allowance and burn rate. Why cannot two overlapping dependency incident counts simply be added as distinct user failures?

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Convert percentages carefully: the allowed bad fraction is 0.0005 and the observed fraction is 0.002.

Compare with the solution

The allowance is 4,000,000 × 0.0005 = 2,000 bad operations. Burn is 0.002/0.0005 = 4. An operation affected by both dependency incidents must be counted once in the end-to-end bad-outcome total; attribution may retain both causes, but adding their counts would double-count the overlap.

Take it with you

  • Compose failure allowances using consistent original-operation populations.
  • The union bound supports conservative allocation without assumed independence.
  • Burn rate is a rate ratio whose time interpretation depends on traffic and prior spending.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.