Reliability targets Updated

Multiwindow, multi-burn-rate alerting

Alert on how fast the error budget is being spent, not on whether an error rate crossed a line. Page when a large share of the budget is being spent quickly, open a ticket for slow leaks, and require a short window to agree so alerts clear soon after recovery.

On this page
  1. Burn rate in one paragraph
  2. Why simple threshold alerts fail
  3. Recommended parameters
  4. Prometheus rules
  5. Low traffic and very high SLOs

Burn rate in one paragraph

burn rate = error rate ÷ (1 − SLO)

With a 99.9% SLO the budget is 0.1%. An error rate of 0.1% is a burn rate of 1: the budget lasts exactly the window. An error rate of 1.44% is a burn rate of 14.4: a 30-day budget lasts 50 hours. To alert when a given share of the budget has been spent within an alert window:

burn-rate threshold = budget share × SLO window ÷ alert window

2% of a 30-day (720-hour) budget in 1 hour gives 0.02 × 720 ÷ 1 = 14.4.

Why simple threshold alerts fail

Google’s SRE Workbook judges alerting strategies on four properties:

Alerting when the error rate over a short window exceeds the SLO (say 0.1% over 10 minutes) has good recall and detection time, but terrible precision: a 10-minute blip that spends 0.02% of the monthly budget pages someone. Lengthening the window improves precision but makes detection and reset slow. Adding a for: duration delays every alert equally, including the severe ones. A single burn-rate alert fixes precision but either misses slow burns or pages too late for fast ones. Combining several burn rates, each checked over a long and a short window, gets good scores on all four.

Recommended parameters

Starting values from the Workbook for a 30-day SLO window. Each long window is paired with a short window one twelfth its length; both must exceed the threshold.

SeverityBudget spentLong windowShort windowBurn rateError rate at 99.9%
Page2%1 hour5 minutes14.41.44%
Page5%6 hours30 minutes60.6%
Ticket10%3 days6 hours10.1%

Burn rates depend on the SLO window. A 28-day window gives 13.44, 5.6 and 0.93; a 7-day window gives 3.36, 1.4 and 0.23. The calculator recomputes the table for any SLO and window.

Detection time

Because each alert fires when a fixed share of the budget has been spent, worse incidents alert faster. For a 99.9% SLO, if the error rate jumps suddenly and stays there:

Alert100% errors2% errors
Page: 14.4× over 1 hour51.8s43m 12s
Page: 6× over 6 hours2m 10s1h 48m
Ticket: 1× over 3 days4m 19s3h 36m

Detection time = threshold error rate ÷ actual error rate × long window. These are idealised: they assume no errors before the incident, a full window of history and steady traffic. Add scrape interval, rule evaluation interval and notification delay. Even so, a total outage crosses the page threshold in under a minute, while a 2% error rate takes about 43 minutes, by which point 2% of the monthly budget is gone, which is by design.

Why the short window

Without it, a one-hour window keeps the alert firing for up to an hour after a fix, because the bad minutes are still inside the window. Requiring the 5-minute window to agree means the alert stops within minutes of recovery, and it also stops a burst that has already ended from paging someone late.

Prometheus rules

Record the error ratio for each window, then alert on combinations. This example assumes a counter http_requests_total with a code label, for a service with job="checkout" and a 99.9% SLO.

groups:
  - name: slo:checkout:recordings
    rules:
      - record: job:slo_errors_per_request:ratio_rate5m
        expr: |
          sum by (job) (rate(http_requests_total{job="checkout", code=~"5.."}[5m]))
          /
          sum by (job) (rate(http_requests_total{job="checkout"}[5m]))
      # Repeat with [30m], [1h], [6h] and [3d], recording
      # ratio_rate30m, ratio_rate1h, ratio_rate6h and ratio_rate3d.

  - name: slo:checkout:alerts
    rules:
      - alert: CheckoutErrorBudgetBurn
        expr: |
          (
            job:slo_errors_per_request:ratio_rate1h{job="checkout"} > (14.4 * 0.001)
            and
            job:slo_errors_per_request:ratio_rate5m{job="checkout"} > (14.4 * 0.001)
          )
          or
          (
            job:slo_errors_per_request:ratio_rate6h{job="checkout"} > (6 * 0.001)
            and
            job:slo_errors_per_request:ratio_rate30m{job="checkout"} > (6 * 0.001)
          )
        labels:
          severity: page
        annotations:
          summary: Checkout is burning its 30-day error budget fast

      - alert: CheckoutErrorBudgetSlowBurn
        expr: |
          job:slo_errors_per_request:ratio_rate3d{job="checkout"} > 0.001
          and
          job:slo_errors_per_request:ratio_rate6h{job="checkout"} > 0.001
        labels:
          severity: ticket

Low traffic and very high SLOs

At low request rates a handful of failures is a large ratio. At 10 requests per minute, an hour holds 600 requests: nine failures in that hour (1.5%), one of them in the last five minutes (2% of 50), satisfy the 14.4× page for a 99.9% SLO. Options:

Two Prometheus details matter at any traffic level. If no request has ever failed, the error series may not exist, and the ratio returns no data instead of zero; initialise counters to zero for every label combination you alert on. With no traffic at all, the ratio is 0 ÷ 0, which is not a number and never exceeds a threshold, so missing traffic and missing telemetry need their own alerts, such as absent() or a traffic-drop rule.

Very high targets have the opposite problem. At 99.999% a 30-day budget is under 26 seconds of full outage, so even the fastest alert leaves almost no time to respond. Meeting such targets depends on making full outages rare and small, through redundancy, gradual rollouts and limited blast radius, and on automated mitigation; paging still matters for follow-up. Very low targets break the other way: at 90%, a full one-hour outage spends only 1.4% of a 30-day budget, so the 2%-in-one-hour page can never fire. Tune the parameters for such services.

Source: Google, The Site Reliability Workbook, ch. 5 “Alerting on SLOs”.