# Burn-Rate Alerting: SLOs That Page for the Right Reasons

> How we derive burn-rate alert thresholds from an SLO target, wire them as CloudWatch composite alarms, and choose SLIs for AI features and quiet services.

- URL: https://weaveward.com/blog/slo-burn-rate-alerting-ai-services
- Published: 2026-11-02
- Updated: 2026-11-12
- Category: Security & Cloud
- Tags: slo, observability, alerting
- Author: Weaveward Team

Most alerting starts as thresholds someone typed in on a bad day: page if the error rate passes 1%, page if p99 latency passes two seconds. Those rules page at 3 a.m. for a blip that cost nothing and stay silent while a slow leak eats a month of reliability. That is not a tuning problem; the rules do not know what the service promised.

Our thesis: a page should mean that the error budget is being spent fast enough that a person must act now. Everything else is a ticket or a dashboard. Burn-rate alerting makes that precise, and once the maths is written down the thresholds can be derived in code instead of argued about in review.

We derive the multi-window, multi-burn-rate method step by step, show how our Cloud Platform Kit prototype turns an availability target into CloudWatch alarms, give the Prometheus equivalent, and cover what usually goes wrong: SLIs for AI features, services too quiet to trust a ratio, and who owns the page.

## Budget first: SLI, SLO and what 99.9% buys

A service level indicator (SLI) is a ratio of good events to valid events: requests answered without a server error, or requests answered within a latency threshold. A service level objective (SLO) is a target for that ratio over a period, such as 99.9% over 30 days. The error budget is what the target leaves over: `1 - SLO`, so 0.1% of events may fail.

The budget becomes concrete in time. A 30-day period is 43,200 minutes, and 0.1% of that is 43.2 minutes of total outage. At 99.5% it is 216 minutes; at 99.99% it is 4.32 minutes, which a total outage spends faster than most people can acknowledge a page. At that level the defence is automated rollback and gradual releases, not a faster pager.

## Deriving burn-rate thresholds step by step

The burn rate is how fast you are spending budget relative to plan:

`burn rate = observed error ratio / (1 - SLO)`

A burn rate of 1 spends exactly the whole budget by the end of the period. At 99.9%, an error ratio of 1.44% is a burn rate of 14.4. The share of the budget spent while that rate holds for a window is:

`budget consumed = burn rate x window / period`

An alert policy turns this around. You decide how much budget is worth a page and over what window, then solve for the burn rate:

1. Pick the budget share and the long window: 2% of a 30-day budget over 1 hour
2. Solve for the burn rate: 0.02 x 720 h / 1 h = 14.4
3. Convert to an error-ratio threshold: 14.4 x 0.001 = 1.44%
4. Check detection time at a total outage: 1.44% of a 60-minute window is 0.864 minutes, or 51.84 seconds
5. Repeat for the slower policies: 5% over 6 hours gives 0.05 x 720 / 6 = 6, and 10% over 3 days gives 0.1 x 720 / 72 = 1

These are the starting parameters recommended in Google's SRE Workbook. We never type the resulting thresholds by hand. This function derives them and refuses policies that cannot work:

```python
from dataclasses import dataclass

MINUTES_PER_DAY = 1440


@dataclass(frozen=True)
class Policy:
    severity: str
    budget_share: float  # share of the period's budget spent when the alert fires
    long_min: int
    short_min: int


WORKBOOK = (
    Policy("page", 0.02, 60, 5),
    Policy("page", 0.05, 360, 30),
    Policy("ticket", 0.10, 4320, 360),
)


def plan(target: float, period_days: int, p: Policy) -> dict[str, object]:
    budget = 1 - target  # allowed error ratio
    period_min = period_days * MINUTES_PER_DAY
    if not (p.short_min < p.long_min <= period_min):
        raise ValueError(f"bad windows {p.long_min}/{p.short_min} min")
    burn = p.budget_share * period_min / p.long_min
    threshold = burn * budget
    if threshold >= 1:
        raise ValueError(f"{burn:g}x needs a {threshold:.0%} error ratio; it can never fire")
    return {
        "severity": p.severity,
        "spent": f"{p.budget_share:.0%}",
        "windows": f"{p.long_min} / {p.short_min} min",
        "burn_rate": round(burn, 6),
        "threshold": f"{threshold:.2%}",
        "fires_after_s": round(threshold * p.long_min * 60, 4),  # at a total outage
        "budget_gone_h": round(period_min / burn / 60, 2),  # if the burn continues
    }


for policy in WORKBOOK:
    print(plan(0.999, 30, policy))
```

Running it for 99.9% over 30 days prints the rows below:

| Severity | Budget spent | Long / short window | Burn rate | Error-ratio threshold | Fires after, total outage | Budget gone if it continues |
|---|---|---|---|---|---|---|
| Page | 2% | 1 h / 5 min | 14.4 | 1.44% | 51.84 s | 50 h |
| Page | 5% | 6 h / 30 min | 6 | 0.60% | 129.6 s | 120 h |
| Ticket | 10% | 3 d / 6 h | 1 | 0.10% | 259.2 s | 720 h |

The last column is the argument for the severities. A 14.4x burn empties the month in about two days, so someone should look within the hour; a 1x burn deserves the next working day, not a call at night. The `threshold >= 1` check, which the kit's library also enforces, matters more than it looks: at a 90% target the fast policy would need a 144% error ratio and could never fire. It only works for targets above roughly 93.06%, where 14.4 x (1 - target) drops below 1.

## Why every alert has a short window

A long window alone gives good precision and terrible reset time. Take an illustrative incident: a total outage for 3 minutes on steady traffic, then full recovery. It spends 3 / 43.2 = 6.9% of the monthly budget, so it deserves a page. The 1-hour ratio crosses 1.44% within a minute, then sits at about 5% (3 bad minutes in 60) for nearly an hour after recovery. An alert on that window alone keeps firing long after anyone could act, and the next incident arrives while the old one still looks open.

The fix is a second, shorter window that must also exceed the same threshold. The workbook suggests one twelfth of the long window: 5 minutes for 1 hour, 30 minutes for 6 hours, 6 hours for 3 days. In the example the 5-minute ratio climbs to 60% during the outage and falls to zero 5 minutes after recovery, so the page clears then instead of an hour later.

The same incident also pushes the 6-hour pair over its threshold (3 / 360 is 0.83%, above 0.6%). That is why the policies of one severity should be combined into a single alert; otherwise one outage sends two or three notifications.

## SLIs for AI features

Cloud Platform Kit measures availability only, at the load balancer; its reference service is a consent-record API with no model behind it. For an AI feature the burn-rate machinery stays identical, and the work moves into choosing honest good and bad events.

| Signal | Good event | Where to count it | How we treat it |
|---|---|---|---|
| Availability | Request finishes without a server error, including streams that complete | Load balancer plus an application counter for completed streams | SLO; fast and slow burns page |
| Latency | First token, or the full answer, arrives within a fixed threshold | Application histogram with a bucket boundary at the threshold | SLO; usually pages on fast burn only |
| Schema validity | Output parses and validates, including after one repair attempt | Application counter on every request | SLO; tickets, because a fix is a prompt or model change |
| Grounded answers | A sampled answer is judged supported by its cited sources | Sampled evaluation job | SLO on long windows only; tickets |
| Cost | Not an event ratio | Provider usage and invoices | A budget with a spend-rate alert, not an SLO |

Three details decide whether these work. First, streaming hides failures from the load balancer: once the status line has gone out as 200, a stream that dies halfway never counts as a 5xx, so availability needs an application counter for streams that finish. We cover stream deadlines in [serving LLM features with backpressure, deadlines and streaming](/blog/llm-api-backpressure-deadlines-streaming).

Second, a latency SLI is a ratio, not a percentile: the share of requests whose time to first token is under a threshold. With a histogram that only works when a bucket boundary sits on the threshold. The kit's service records `http.server.request.duration` with boundaries that include 1 s and 2.5 s, so those thresholds count exactly and 2 s does not. A percentile alarm, such as the kit's operational p99 alarm at 1.5 s, has no budget to burn and belongs to diagnosis.

Third, quality signals arrive slowly. A schema-valid rate computed on every request can burn like availability (see [validating and repairing structured LLM output](/blog/structured-llm-output-validation-repair)); a grounded-answer rate from a sampled judge has far fewer events and supports only long windows and tickets. Cost reuses the arithmetic without an SLO: a day that spends a tenth of a 30-day cap is a 3x spend burn.

## When traffic is too thin to trust a ratio

Ratios lie at low volume. Suppose a service takes 10 requests an hour, or 7,200 in 30 days; at 99.9% the budget is 7.2 failed requests. One failure makes the hourly ratio 10%, a burn rate of 100, which spends 100 x 1 / 720 = 13.9% of the budget at once. In general, a single failure pages through the fast policy whenever the hour holds 69 or fewer requests, since 1 / 0.0144 is about 69.4.

We use three remedies, usually together:

- **Minimum event counts.** Require a floor of requests in the long window before an alert may fire. With an illustrative floor of 100 an hour, a fast page needs at least two failures, because one is 1% and stays under 1.44%
- **Synthetic probes.** A prober on a real user path adds denominator and catches outages in quiet hours, but its successes can also dilute a failure that only real users hit
- **Fewer, larger SLOs.** Grouping endpoints that share a failure domain gives each alert more events; sometimes the target is simply too strict for the traffic

The kit makes the quiet case explicit. Its SLI is `IF((requests + rejected) > 0, (target 5xx + load balancer 5xx) / (requests + rejected), 0)`, where `rejected` is the load balancer's own 503 count for requests that found no healthy target, and every metric is wrapped in `FILL(..., 0)`, so a silent hour counts as healthy. AWS documents the trade-off: `FILL` in an alarm can pin the latest datapoint to the fill value when metrics arrive late. Quiet-as-healthy is the right default for paging, but a service with no traffic at all then needs a probe or a running-task alarm.

## How the kit wires it in CloudWatch

In Cloud Platform Kit, a TypeScript CDK prototype for the Jakarta region, the SLO library in `infra/src/slo/` turns each environment's availability target into alarms: 99.9% in production, 99.5% in staging and 99% in development, all over 30 days. For every policy it builds two alarms on the same metric-math error ratio, one with a period equal to the long window and one equal to the short window, each with a single evaluation period, and a composite alarm per severity combines them. This condensed version of `slo-alarms.ts` type-checks and synthesises against aws-cdk-lib 2.271.0:

```ts
type AlertPlan = { severity: "page" | "ticket"; longMinutes: number; shortMinutes: number; threshold: number };
type ErrorRatio = (period: Duration, label: string) => IMetric;

const label = (m: number): string =>
	m % 1440 === 0 ? `${m / 1440}d` : m % 60 === 0 ? `${m / 60}h` : `${m}m`;

const windowAlarm = (scope: Construct, prefix: string, ratio: ErrorRatio, plan: AlertPlan, minutes: number): Alarm => {
	const alarmName = `${prefix}-slo-${plan.severity}-${label(minutes)}`;
	return new Alarm(scope, `Slo${plan.severity}${label(minutes)}`, {
		alarmName,
		metric: ratio(Duration.minutes(minutes), alarmName),
		threshold: plan.threshold, // derived, never typed by hand
		evaluationPeriods: 1, // one period as long as the window itself
		datapointsToAlarm: 1,
		comparisonOperator: ComparisonOperator.GREATER_THAN_THRESHOLD,
		treatMissingData: TreatMissingData.NOT_BREACHING,
	});
};

export const createSloComposites = (
	scope: Construct, prefix: string, ratio: ErrorRatio,
	plans: ReadonlyArray<AlertPlan>, actions: ReadonlyArray<IAlarmAction>,
): CompositeAlarm[] =>
	(["page", "ticket"] as const).flatMap((severity) => {
		const pairs: IAlarmRule[] = plans
			.filter((plan) => plan.severity === severity)
			.map((plan) => AlarmRule.allOf(
				AlarmRule.fromAlarm(windowAlarm(scope, prefix, ratio, plan, plan.longMinutes), AlarmState.ALARM),
				AlarmRule.fromAlarm(windowAlarm(scope, prefix, ratio, plan, plan.shortMinutes), AlarmState.ALARM),
			));
		if (pairs.length === 0) return [];
		const composite = new CompositeAlarm(scope, `Slo${severity}Composite`, {
			compositeAlarmName: `${prefix}-slo-${severity}`,
			alarmRule: AlarmRule.anyOf(...pairs), // page = (1h AND 5m) OR (6h AND 30m)
		});
		for (const action of actions) composite.addAlarmAction(action); // only composites notify
		return [composite];
	});
```

The page composite synthesises to `(1 h AND 5 min) OR (6 h AND 30 min)` and the ticket composite to `(3 d AND 6 h)`. Window alarms carry no actions; only the composites notify the KMS-encrypted SNS topic, which solves the duplicate-notification problem.

Two CloudWatch limits shape the design. A period must be a multiple of 60 seconds, and period times evaluation periods may not exceed seven days, or one day for periods under an hour. One evaluation period as long as the window is what makes a 3-day window possible, and the library throws at synthesis, not at deploy time, for any window that breaks those limits. With no evaluation window set, CloudWatch uses a sliding one, which is what the reset-time reasoning assumes.

The kit adds the alarm we consider the most valuable: a deployment guard on the fast policy's short window and threshold, 5 minutes at 1.44% in production. ECS lists it as a deployment alarm with rollback beside the circuit breaker, so a release that starts burning budget is reverted without waiting for anyone. It has no long window on purpose, because its action is a cheap automatic rollback, not a person's night. The kit is a prototype whose shipped profiles use synthetic account IDs, and its runbooks state that they have not been rehearsed against a real account, so treat these alarms as a tested design rather than an operated one.

## The Prometheus version

Teams on Prometheus get the same design from recording rules and one alert expression. The kit's local stack runs Prometheus behind an OpenTelemetry collector but ships no rule files, so the rules below are our illustration built on the series its Grafana dashboard already queries:

```yaml
groups:
  - name: availability-sli
    rules:
      - record: slo:request_errors:ratio_rate5m
        expr: |
          sum(rate(http_server_request_duration_seconds_count{http_response_status_code=~"5.."}[5m]))
            / sum(rate(http_server_request_duration_seconds_count[5m]))
      - record: slo:request_errors:ratio_rate1h
        expr: |
          sum(rate(http_server_request_duration_seconds_count{http_response_status_code=~"5.."}[1h]))
            / sum(rate(http_server_request_duration_seconds_count[1h]))
      # slo:request_errors:ratio_rate30m, _rate6h and _rate3d follow the same pattern
      - record: slo:requests:count1h
        expr: sum(increase(http_server_request_duration_seconds_count[1h]))
  - name: availability-slo-alerts
    rules:
      - alert: ErrorBudgetFastBurn
        expr: |
          (
              (slo:request_errors:ratio_rate1h > 14.4 * 0.001 and slo:request_errors:ratio_rate5m > 14.4 * 0.001)
            or
              (slo:request_errors:ratio_rate6h > 6 * 0.001 and slo:request_errors:ratio_rate30m > 6 * 0.001)
          )
          and on () slo:requests:count1h >= 100
        labels:
          severity: page
        annotations:
          summary: "Availability budget burning at 6x or more (99.9% over 30 days)"
          runbook: "docs/runbooks/rollback.md"
```

`promtool check rules` accepts this file. A quiet window divides zero by zero, and the resulting NaN never compares greater than a threshold, so it cannot alert, much like the kit's `FILL` default. The `and on ()` clause carries the minimum event count. Generate the thresholds from the same plan as the CloudWatch side; two systems with hand-copied numbers will drift.

## Runbooks, routing and ownership

An alert without an owner and a first step is noise. We hold every SLO alert to three properties.

The first is a runbook link in the alert. A CloudWatch composite alarm's description can include Markdown shown in the console, so it can link straight to its runbook; the kit's descriptions currently state the condition, and its rollback runbook supplies the steps: a table of symptoms and actions, a manual image rollback when the pipeline is too slow, and an after-incident list that includes confirming the composite SLO alarms are back to OK and recording how much error budget the incident spent.

The second is routing by severity. In the kit both composites, plus five operational alarms for database CPU and storage, running tasks, unhealthy targets and p99 latency, go to one SNS topic, with an email subscriber configured only in production. Before real production use we would route the page composite to an on-call tool and everything else to a queue, because a page that arrives beside five non-urgent emails gets read like one of them.

The third is a named owner for the SLO itself: someone who decides what the budget is spent on, accepts a lower target when traffic cannot support the current one, and freezes feature work when the budget runs out. Burn-rate alerts say how fast the budget is going; ownership decides what happens next.

## Checklist

- Express SLIs as good events over valid events, and state the budget in minutes
- Derive thresholds in code from the target, period and budget share; never type them by hand
- Pair every long window with a short one of about one twelfth, and merge each severity into one alert
- Page on 2% in 1 hour and 5% in 6 hours, ticket on 10% in 3 days
- Count completed streams, time to first token and schema validity as ratios; treat model cost as a budget
- Add a minimum event count or a synthetic probe on quiet services
- Give every SLO alert a runbook link, a severity route and a named owner

## Primary references

- [Google SRE Workbook, Alerting on SLOs](https://sre.google/workbook/alerting-on-slos/)
- [Amazon CloudWatch, Math expressions with metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/using-metric-math.html)
- [Amazon CloudWatch API Reference, PutMetricAlarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_PutMetricAlarm.html)
- [Amazon CloudWatch, Create a composite alarm](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Create_Composite_Alarm.html)
- [Prometheus, Defining recording rules](https://prometheus.io/docs/prometheus/latest/configuration/recording_rules/)

## Related reading

- [Software Maintenance Service Levels: Set Clear Expectations](/blog/software-maintenance-service-levels)
- [Real-Time Dashboards: Define Freshness Before Architecture](/blog/real-time-dashboards)

The SLO library described here is part of our [Cloud Platform Kit case study](/work/cloud-platform-kit-aws-jakarta), and our [IT consulting](/services/it-consulting) team builds the same alerting into client platforms.
