Skip to main content

SLOs, SLIs, and Error Budgets

1. Executive Summary​

Service Level Indicators (SLIs), Service Level Objectives (SLOs), and error budgets form the quantitative backbone of modern reliability engineering. An SLI is a measured signal of service behavior (availability, latency, correctness). An SLO is a target threshold over a window (e.g., 99.9% of requests succeed in 30 days). The error budget is the complement—the acceptable unreliability before the SLO is breached.

This framework—popularized by Google SRE—translates vague "five nines" aspirations into actionable policies: when budget remains, teams ship features; when budget burns, they prioritize stability, defer launches, and investigate. On AWS, SLIs are derived from CloudWatch, ALB access logs, X-Ray, Synthetics canaries, and application instrumentation.

Principal architects must connect SLOs to architecture decisions (redundancy cost), incident response (burn-rate alerts), and organizational negotiation (product vs reliability tradeoffs)—not treat SLOs as metrics dashboard decoration.

2. Why This Topic Matters​

Reliability is a defining principal-level competency. Interviewers expect:

  • Precise definitions of SLI, SLO, SLA, SLAs vs internal SLOs.
  • How to choose SLIs aligned with user experience.
  • Error budget policies and their effect on release cadence.
  • Multi-window burn-rate alerting (Google SRE Workbook).
  • Distinguishing availability from correctness and latency.
  • Connecting SLO miss to postmortem and architectural remediation.

Teams without SLOs debate outages emotionally; teams with SLOs debate data.

3. Problems Being Solved​

ProblemSLO framework response
Subjective reliabilityMeasurable SLIs and agreed SLOs
Feature vs stability conflictError budget as negotiated currency
Alert fatigueAlert on SLO burn rate, not every blip
Misaligned monitoringMeasure what users experience
Over-engineeringSLO tiering matches investment to risk
Customer communicationSLAs external; SLOs internal often stricter

SLOs do not replace capacity planning, security, or DR—they prioritize among them.

4. Assumptions and System Model​

AssumptionImplication
User-perceived reliability is partialSLIs must proxy user experience
100% is impossibleSLO < 100%; budget is finite
Measurement has errorInstrumentation gaps create false confidence
SLOs are team commitmentsNot individual engineer KPIs in isolation
Window mattersMonthly vs quarterly changes budget math

Client model: Users experience composite reliability across DNS, CDN, API, database, and third parties—SLO scope must define dependency boundaries.

5. Essential Terminology​

TermDefinition
SLIQuantitative measure of service aspect (e.g., success rate)
SLOTarget value/range for SLI over time window
SLAContract with customer consequences (credits, penalties)
Error budget1 − SLO target (allowed bad events)
Burn rateRate of budget consumption vs steady state
Multi-window alertFast burn (1h) + slow burn (6h) pages
AvailabilityProportion of successful requests or uptime
Latency SLIFraction of requests faster than threshold
Good event / valid eventNumerator/denominator definitions for SLI
Tier-1 / Tier-2 serviceCriticality classification driving SLO strictness

6. Core Mechanism​

6.1 SLI selection​

Common SLI types:

TypeExampleUser proxy quality
AvailabilityHTTP 5xx rate, health check successHigh if measured at edge
Latency% requests < 300ms at p99High with correct percentile
CorrectnessBusiness transaction success rateHighest when domain-specific
FreshnessData age for pipelinesCritical for analytics/search
DurabilityObjects not lost (S3-style)Storage systems

Rule: SLI should be simple, measurable, and user-centric. Avoid infra-only metrics (CPU) as primary SLIs unless they directly predict user pain.

6.2 SLO formulation​

Example: 99.9% availability over rolling 30 days.

  • Valid events: all GET/POST /api/* excluding client 4xx.
  • Good events: responses not 5xx and not timeout.
  • Budget: 0.1% = ~43.2 minutes downtime equivalent per 30 days (if uniformly spread—burn is often spiky).

Latency SLO example: 99% of checkout requests complete in < 500ms (server-side), measured at ALB.

6.3 Error budget math​

For availability SLO target T over window with N valid events:

\text{bad events allowed} = N \times (1 - T)

Burn rate at time t:

\text{burn rate} = \frac{\text{error rate}}{\text{budget error rate}}

Burn rate = 1 → consuming budget at exactly sustainable pace. Burn rate = 10 → budget exhausted 10× faster than sustainable.

Figure 1: SLO feedback loop—measurement feeds budget; policy gates releases and alerting.

6.4 Burn-rate alerting (multi-window)​

Google SRE Workbook recommends alerting on burn rate across windows:

WindowPurpose
5–10 minCritical fast burn (major outage)
1 hourConfirm sustained impact
6 hourModerate burn
3 daySlow leak detection

Example policy for 99.9% SLO: page if 14.4× burn over 1h and 6× burn over 6h (constants from SRE workbook for that target).

This reduces pages on single blips while catching real outages.

6.5 AWS instrumentation for SLIs​

SourceSLI use
ALB HTTPCode_Target_5XX_Count, TargetResponseTimeAvailability and latency at load balancer
API Gateway 5XXError, LatencyServerless API tier
CloudWatch SyntheticsCanary success rate (synthetic availability)
Route 53 health checksDNS-level reachability
Custom metricsBusiness correctness SLIs
X-RayLatency breakdown; not primary SLI alone

Amazon CloudWatch Application Signals (evolving) and third-party tools (Datadog, Honeycomb) provide SLO dashboards with burn-rate alerts.

Figure 2: Layered SLIs—synthetic (user-like), load balancer (service), application (business truth).

6.7 SLI anti-patterns on AWS​

Anti-patternWhy it failsBetter approach
EC2 CPU < 80% as SLO proxyCPU idle during user-facing outageALB 5xx + synthetics
Pingdom onlyMisses partial API failuresLayer server + journey SLIs
Including 401 in error SLIClient auth mistakes penalize serviceExclude expected client faults
Monthly manual spreadsheetStale; no burn alertingAutomated rolling window
Per-engineer SLOGaming metrics; no system viewService/journey level

7. Step-by-Step Walkthrough​

Walkthrough A: Define SLO for REST API on ALB​

  1. Choose SLI: (valid_requests - 5xx - timeouts) / valid_requests.
  2. Exclude 4xx client errors from denominator if not service fault.
  3. Set SLO: 99.95% over 30 rolling days (tier-1 payment adjacency).
  4. Compute budget: 0.05% ≈ 21.6 min/month equivalent.
  5. Dashboard: CloudWatch metric math or Grafana/Datadog SLO widget.
  6. Alerts: 14.4× burn 1h + 6× burn 6h → PagerDuty.

Walkthrough B: Latency SLO with percentiles​

  1. SLI: proportion of requests with TargetResponseTime < 0.5s.
  2. SLO: 99% of requests under 500ms monthly.
  3. Use histogram metrics (not average—averages lie).
  4. Track multi-region SLIs separately if latency differs.

Walkthrough C: Error budget policy meeting​

  1. Week 4: budget 60% consumed after bad deploy.
  2. Policy: >50% burn before mid-month → freeze non-critical releases.
  3. Team runs rollback, adds integration tests, resumes launches when burn stabilizes.
  4. Postmortem action items tracked against reliability backlog.

Walkthrough D: Composite dependency SLO​

  1. Checkout depends on Payment API (99.9%) and Inventory (99.5%).
  2. Don't multiply naively for planning—use joint incident history.
  3. Define user journey SLI via synthetic checkout canary (black box).
  4. Internal SLOs per team; journey SLO for leadership.

Walkthrough E: SLO miss postmortem​

  1. Incident: 45 min partial outage → 99.9% monthly SLO breached.
  2. Calculate actual bad events vs budget.
  3. Root cause: RDS failover untested; connection pool stale.
  4. Remediation: pool retry logic, game day, tighten burn alerts.
  5. Blameless review; SLO miss is system signal not individual fault.

Walkthrough F: Implementing SLOs with Amazon Managed Grafana and AMP​

For teams standardizing on AWS observability without a third-party vendor:

  1. Instrument services with ADOT exporting histogram metrics to Amazon Managed Prometheus (AMP).
  2. Define recording rules or PromQL queries for availability: sum(rate(http_requests_total{status!~"5.."}[5m])) / sum(rate(http_requests_total[5m])).
  3. Create Amazon Managed Grafana (AMG) dashboard with 30-day rolling SLO panel.
  4. Configure Alertmanager (or CloudWatch alarms on exported metrics) for burn-rate thresholds.
  5. Document SLI spec in slo/order-api.yaml using OpenSLO or Sloth format for GitOps review.

This pattern keeps SLO definitions version-controlled while leveraging AWS-managed backends—tradeoff is PromQL learning curve vs vendor SLO wizards.

Walkthrough G: Tiering SLOs across service portfolio​

TierExample servicesAvailability SLOLatency SLOOn-call
Tier-1Checkout, auth99.95%99% < 300ms24×7 page
Tier-2Search, recommendations99.9%99% < 1sBusiness hours + best effort
Tier-3Internal admin, batch reports99.5%Best effortNext business day

Principal architects facilitate portfolio negotiation—not every microservice warrants four-nines. Align tier to revenue at risk and dependency graph (tier-1 journey may include tier-2 services—journey SLO still applies).

SLO communication with leadership​

Translate technical SLOs into business language:

  • 99.9% monthly ≈ 43 minutes of allowed bad events per 30 days.
  • Error budget consumed = reliability debt—defer feature risk or invest in hardening.
  • SLO miss without postmortem action = organizational learning failure.

Executive dashboards should show budget remaining and top burn contributors (deploy, dependency, capacity)—not raw metric dumps.

Interview tip: When asked "what SLO would you set?", always respond with questions: Who is the user? What action matters? What is the revenue or safety impact of failure? Then propose an SLI, justify the target from current baseline plus headroom, and describe the error budget policy—not a round number picked from industry folklore.

8. Invariants and Guarantees​

PropertyStatement
Budget exhaustionMathematically certain if error rate sustained above SLO
SLI definition stabilityChanging SLI definition resets historical comparability
Synthetic ⊂ realCanaries may miss edge cases; complement with server metrics
SLO ⊂ SLA typicallyInternal target stricter than contractual SLA

SLOs are organizational commitments, not physical laws—enforcement is cultural and procedural.

9. Failure Scenarios​

FailureImpactMitigation
SLI blind spotFalse green dashboard during user outageLayer synthetic + edge + business metrics
Bad denominatorIncludes health-check noise or bot trafficFilter valid events carefully
Alert on mean latencyMisses tail violationsPercentile/histogram SLIs
Budget ignoredSLO theaterExecutive-backed freeze policy
Too many SLOsDiluted focus2–3 per service
Third-party dependencyExternal API breaks your SLODependency SLOs, timeouts, fallbacks
Metric lossCloudWatch gapDual export to vendor, local buffering

10. Performance Characteristics​

SLO evaluation itself is cheap; instrumentation cost matters:

  • High-cardinality custom metrics expensive in CloudWatch.
  • Log-based SLIs (ELB → S3 → Athena) higher latency for alerting—use metrics path for pages.
  • Sampling in tracing must not distort tail latency SLIs.

11. Scalability Limits​

  • Cardinality explosion when SLI labels include unbounded user_id.
  • Multi-tenant SLOs per customer—operational burden scales linearly.
  • Global SLO aggregation hides regional brownouts—use slice by region/AZ.

12. Operational Considerations​

  • SLO review quarterly with product and leadership.
  • Document SLI spec in repo (YAML/JSON) — version controlled.
  • Runbooks linked from burn-rate alerts.
  • Error budget report in weekly ops review.
  • Chaos experiments validate SLO measurement (inject failure, confirm alert fires).
  • AWS Well-Architected Reliability lens aligns with SLO practice.

Figure 3: Error budget gate—optional CI/CD integration blocks deploy when budget exhausted.

13. Security Considerations​

  • SLI data may expose traffic patterns—restrict dashboard access.
  • Synthetic canaries need credentials—rotate; scope minimally.
  • Don't log PII in SLI pipelines (access logs retention policies).

14. Cost Considerations​

ItemTradeoff
Higher SLO (99.99%)More redundancy, multi-region, on-call cost
Custom metricsCloudWatch charges per metric/alarm
Third-party SLO toolsLicense vs engineering time
Synthetics canariesPer-run pricing

FinOps link: Reliability spend should correlate with error budget headroom and revenue at risk.

15. Production Implementations​

Organization patternImplementation
Google SRE styleMulti-window burn, blameless postmortems
AWS nativeCloudWatch alarms on ALB + composite metrics
Vendor SLODatadog/Honeycomb/New Relic SLO widgets
GitOps SLOSloth/OpenSLO definitions in Git

Netflix, Google, and major SaaS vendors publish reliability culture essays—adapt patterns, don't copy numbers.

16. Alternatives and Tradeoffs​

AlternativeWhen
Uptime monitoring onlySimple sites; insufficient for tail latency
SLA-only (external)Reactive; no internal leading indicators
OKRs on uptimeOKRs drift; SLOs are continuous
Mean time between failuresLagging; doesn't guide daily tradeoffs

SLOs win when continuous delivery needs a stability throttle.

17. Common Misconceptions​

MisconceptionReality
"Five nines always"Expensive; most services need tiering
"SLO = SLA"SLA is contractual; SLO is internal target
"100% - uptime = error budget"Must define valid events precisely
"Alerts on CPU"Infra metric ≠ user SLI
"One outage won't matter"Burn rate math may exhaust monthly budget in minutes

18. Principal Architect Perspective​

  • Negotiate SLOs with revenue impact—show cost of 99.99% vs 99.9%.
  • User journey SLOs align orgs better than per-microservice vanity metrics.
  • Error budget policy must have executive air cover or it's ignored.
  • Architect for measurability—if you can't measure it, you can't SLO it.
  • Postmortems consume budget narrative—focus on learning velocity.

19. Architecture Review Exercise​

Scenario: Team sets 99.99% SLO but runs single-AZ RDS, no autoscaling, on-call only business hours.

Finding: Architecture cannot sustain four-nines; SLO is aspirational fiction.

Recommendation: Either lower SLO to match architecture (99.9% + multi-AZ) or fund multi-AZ, autoscaling, 24×7 on-call, and chaos program.

20. Whiteboard Explanation​

"We measure SLIs—signals like successful requests over valid requests. Our SLO is 99.9% over 30 days, leaving 0.1% error budget—about 43 minutes of bad events per month if spread evenly. We alert on burn rate: how fast we're consuming that budget. Fast burn pages on-call via multi-window rules from the SRE workbook. When budget is exhausted, we freeze risky launches and fix reliability. SLIs come from ALB metrics and synthetic canaries that mimic checkout. This turns reliability from opinion into a product tradeoff we manage explicitly."

21. Interview Questions​

  1. Difference between SLI, SLO, SLA? — Measure, target, contract.
  2. How calculate error budget? — 1 − SLO over window.
  3. What is burn rate? — Consumption rate vs sustainable error rate.
  4. Why multi-window alerts? — Reduce false positives, catch fast outages.
  5. Good vs valid events? — Denominator/numerator definition.
  6. Why not alert on CPU? — Not user-centric.
  7. Latency SLO: mean or percentile? — Percentile/histogram.
  8. Error budget policy examples? — Freeze releases, require review.
  9. How tier services? — By business criticality and revenue.
  10. Composite microservice SLO? — User journey / black-box preferred.
  11. AWS metrics for availability SLI? — ALB 5xx, API Gateway errors.
  12. What happens after SLO miss? — Postmortem, prioritize reliability work.

22. Interview Follow-Ups​

  1. Derive 43.2 minutes for 99.9% monthly. — 30×24×60×0.001.
  2. Design SLO for async pipeline freshness. — Age of latest successful batch.
  3. Customer-facing SLA credit calculation. — Separate from internal SLO.
  4. Implement burn alert without vendor tool. — CloudWatch metric math anomaly.
  5. SLO for multi-region active-active. — Per-region and global journey SLIs.

22A. Production Low-Level Design (Interview + Game Day)​

SLO platform LLD for checkout API—99.9% availability / 30d with multi-window burn-rate alerts. Production LLD and Game Day Standard.

SLI specification​

FieldValue
SLI typeAvailability (request-based)
Valid eventsGET/POST /api/checkout/* excluding client 4xx
Good eventsHTTP not 5xx, not gateway timeout
MeasurementALB HTTPCode_Target_5XX + request count; synthetic canary backup
SLO target99.9% rolling 30 days
Error budget0.1% ≈ 43.2 min bad-event equivalent / 30d

Burn-rate alerting LLD​

Google SRE Workbook multipliers for 99.9% target:

WindowBurn multiplierPurpose
1 hour14.4×Fast burn—major outage page
6 hour6×Confirm sustained impact
3 day1×Slow leak—ticket, not always page

Alert rule (conceptual): page if 1h burn ≥14.4× AND 6h burn ≥6× (both windows)—reduces single-blip noise.

Step-by-step flow:

StepAction
1Dual SLI: server-side ALB + black-box synthetic checkout
2Rolling 30d numerator/denominator—exclude bot traffic
3Budget = (1 − 0.999) × valid_events
4Dashboard shows budget remaining % for leadership
5Burn rate = current_error_rate / budget_error_rate
6Multi-window AND reduces false pages
7CI policy gate blocks deploy when budget <10%

Latency SLI (companion)​

SLITargetMeasurement
% requests <500ms99% / 30dALB TargetResponseTime histogram—not mean

One DR sentence​

Regional brownouts slice SLIs by region label—global aggregate can hide eu-west-1 degradation while us-east-1 stays green.


22B. Game Day Playbooks​

#DrillInjectDetectMitigateVerify
GD-1Fast burnScale checkout to 0 in staging1h burn >14.4×Rollback deployAlert fires <5m; budget math correct
GD-2Slow leakInject 1% 5xx canary3d burn elevatedFix canary; no page if 1h OKSlow window catches leak
GD-3SLI blind spotBreak dependency not in ALB SLISynthetic fails, ALB greenAdd journey SLIBlack-box catches gap
GD-4Budget freezeExhaust budget in simDeploy gate blocksPrioritize reliability backlogPolicy enforced

GD-1 — Multi-window burn page​

23. Strong Answer Example​

Question: "How would you introduce SLOs to a team that only monitors CPU?"

Answer this as a 45-minute program design using the PRACTICE framework. Below is how a strong student sounds aloud—shift from machine health to user experience with burn-rate alerting.


Student interview script (PRACTICE)​

P — Problem framing​

"The team alerts on CPU < 80% but users still see checkout failures. We need one journey-centric SLO, error budget policy, and multi-window burn alerts—not fifty vanity metrics.

Non-goals for v1: four-nines everywhere, per-engineer SLOs, or replacing the SLA contract language."

R — Requirements​

TypeRequirement
SLIUser-visible checkout success + latency
SLOAchievable initial target; tighten quarterly
AlertingBurn rate—not CPU—pages on-call
PolicyBudget exhausted → freeze non-critical deploys
OpsSLI spec in Git (OpenSLO/Sloth); weekly budget review

A — Assumptions (state aloud)​

AssumptionWhy it matters
ALB in front of checkout APIServer-side availability SLI
CloudWatch Synthetics availableBlack-box journey SLI
Product agrees to budget policySLO without enforcement is theater
30-day rolling windowStandard budget math
Current baseline ~99.7% measuredSet SLO 99.5% initially with headroom

C — Capacity (back-of-envelope)​

Checkout valid events/month → ~10M (say)
99.9% SLO budget → 0.1% = 10,000 bad events allowed
99.5% initial SLO budget → 0.5% = 50,000 bad events (easier first target)
Burn rate 10 → budget exhausted 10× faster than sustainable
1h page threshold (99.9%) → 14.4× burn (SRE workbook constant)
Alert windows → 1h AND 6h to reduce noise

T — Topology (draw this)​

Instrumentation layers: synthetic (user-like) + ALB (service) + optional app correctness metric.

I — Invariants (safety)​

"1. SLI definition stable—changing it resets history. 2. Exclude client 4xx from availability unless service fault. 3. Percentile latency—never mean for SLO. 4. 2–3 SLOs per service max—focus beats sprawl. 5. Blameless postmortem on miss—budget is organizational signal."

C — Constraints (second C)​

ConstraintResponse
Alert fatigue todayReplace CPU pages with burn-only pages
No vendor SLO toolPromQL/CloudWatch metric math + runbook
Third-party PSP failuresDependency timeout + journey SLI captures user pain
Leadership wants "five nines"Show cost: multi-region + 24×7 + budget math
Metric cardinalityNo user_id label on SLI metrics

E — Evolution​

PhaseDeliverable
M1Document SLI spec in Git; ALB dashboard
M2Synthetics canary + 99.5% SLO
M3Multi-window burn alerts (1h + 6h)
M4Error budget deploy gate
M5Game day GD-1 fast burn; tighten to 99.9% if architecture supports

Observability: slo_error_budget_remaining, burn rate by window, top deploy correlation.


Closing line (interview)​

"Start with checkout journey SLI—synthetic plus ALB—99.5% initial SLO, multi-window burn pages at 14.4×/6×, and deploy freeze when budget hits zero. Retire CPU paging. Review quarterly with product. That's how SLOs become a release throttle, not dashboard decoration."

Scoring signals​

StrongWeak / red flag
SLI/SLO/budget definitions precise"Monitor 99.9% uptime"
Multi-window burn mathAlert on every 5xx
User journey + server layersCPU as SLI
Error budget policy with teethSLO miss with no action
Game day validates alertsSpreadsheet monthly manual

Compact outline (if time-boxed to 2 minutes)​

"One journey: checkout synthetics + ALB availability. SLO 99.5% rolling 30d to start. Burn alerts: 14.4× over 1h AND 6× over 6h. Budget exhausted → freeze deploys. SLI spec in Git. Game day inject fault; verify page. Drop CPU alerts."

24. Weak Answer Example​

Weak: "Set 99.9% uptime and monitor CloudWatch."

Red flags: No SLI definition, confuses uptime with availability, no error budget policy, no burn rate.

25. Hands-On Exercise​

  1. Enable ALB access logs to S3; compute weekly availability with Athena.
  2. Create CloudWatch dashboard: HTTPCode_Target_5XX_Count / request count.
  3. Set SLO 99.9%; calculate remaining budget manually.
  4. Configure burn-rate alarm (use workbook multipliers).
  5. Inject fault (scale service to 0 in staging); verify alert latency.
  6. Write one-page error budget policy for fictional product team.

26. Knowledge Check​

  1. Define SLI, SLO, error budget.
  2. Why exclude 4xx from availability SLI?
  3. What burn rate means budget exhausted in 1 hour?
  4. Name two AWS data sources for SLIs.
  5. Why use percentiles for latency SLOs?
  6. Difference between rolling 30-day and calendar month window?
  7. What is a synthetic SLI?
  8. How many SLOs per service is reasonable?
  9. What policy when budget is 0?
  10. Why SLI spec should be version controlled?
  11. How does SLO relate to chaos engineering?
  12. Can SLO be > SLA?

27. Flashcards​

FrontBack
SLIMeasured indicator of service behavior
SLOTarget threshold for SLI over time window
SLAExternal contract with remedies
Error budgetAllowed unreliability: 1 − SLO
Burn rateSpeed of budget consumption vs sustainable rate
Valid eventRequest counted in SLI denominator
Good eventRequest counted in SLI numerator
Multi-window alertFast + slow burn detection
Synthetic monitoringScripted user journey probes
Tier-1 serviceHighest criticality; strictest SLO
Blameless postmortemLearn from SLO miss without punishment
Histogram SLILatency distribution for percentile SLOs

28. Cheat Sheet​

DEFINITIONS
SLI = measure (what happened)
SLO = target (what we promise internally)
SLA = contract (what customer sees)
error budget = 1 - SLO target

AVAILABILITY SLI
good / valid requests
exclude client errors if not service fault
measure at load balancer or synthetic

LATENCY SLI
% requests < threshold (p99 common)
use histograms, not averages

ALERTING
burn rate = error_rate / budget_error_rate
multi-window: 1h + 6h (see SRE workbook)

POLICY
budget healthy → ship
budget low → caution
budget zero → freeze + fix

AWS
ALB/API GW metrics, Synthetics, Route 53 health

30. References​

Primary sources​

Papers and talks​

  • Jones, C., et al. (2019). The Calculus of Service Availability. USENIX ;login:.

Distinction​

  • SRE book formulas — Industry standard burn-rate guidance.
  • Organization SLO targets — Business-specific; do not copy hyperscaler numbers blindly.