Skip to main content
← CONCEPTS / SITE RELIABILITY ENGINEERING
An end-to-end domain learning journey

SLO, SLA &
Error Budgets.

SLOs set internal reliability targets (e.g., 99.95% availability), SLAs attach legal or financial penalties to external commitments (e.g., 99.9%), and error budgets quantify the exact allowance of bad requests or downtime (1 - SLO) before feature velocity must pause for reliability work.
Start the journey7 sections· Last modified Oct 23, 2026
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

If latency budgets leave no room for synchronous retries, SLA & Error Budgets, set your internal SLO tighter than your external SLA so your error budget triggers engineering intervention before customer credits or contract breaches happen.

TL;DR30-second simplified summary
▾

Core Mechanics: Every production system faces a permanent tension between shipping speed and stability.

Visual & Structural Flow: Depicts SLO Error Budget Governance State Machine (BUDGET HEALTHY -> ELEVATED BURN -> BUDGET EXHAUSTED); Fast-Burn vs Slow-Burn SLO Alert Pipeline (SLI Metrics -> Prometheus Rule -> On-Call Pager -> Release Gate).

Trade-Offs & Production: Each additional 'nine' cuts allowed monthly downtime by 10x (from 43.8 min to 4.38 min), satisfying strict enterprise workloads. Dependency Chain Multiplication: If your API synchronously calls three downstream services each with a 99.9% SLO, your combined ceiling is 0.999^3 = 99.7% unless you add fallbacks, caches, or async queues.

Failure Modes & Application: Set your internal SLO tighter than your external SLA so your error budget triggers engineering intervention before customer credits or contract breaches happen.

Before you begin · Building blocksAlready know these? Jump to Stage 01 ↓
System Design (HLD) Architectures
High-Level Design (HLD) translates product requirements and scale targets (QPS, p99 latency, durability, RPO/RTO) into a cohesive topology of edge gateways, stateless compute, caches, async queues, and partitioned data stores. Good HLD explicitly isolates fail...
Full walkthrough · 7 stages
01
STAGE 01 · WHAT IT ISL4 · FUNDAMENTALS

What is SLO, SLA & Error Budgets.

Why this matters: The mechanism: understand how SLO, SLA & Error Budgets works from first principles.

The idea Every production system faces a permanent tension between shipping speed and stability. SLIs, SLOs, and Error Budgets replace subjective arguments with a shared mathematical contract:

  • SLI (Service Level Indicator): A carefully defined quantitative measure of service behavior, almost always expressed as a ratio: Good Events / Valid Events (excluding 4xx client errors or health-check noise). Example: proportion of /v1/orders HTTP requests returning < 500 within 250ms.
  • SLO (Service Level Objective): The target reliability threshold for an SLI over a measurement window (typically 28 or 30 rolling days). Example: 99.95% over 30 days.
  • Error Budget: The inverse of the SLO (100% - SLO). For a 99.95% SLO over 30 days (43,200 minutes), the budget is 0.05%—exactly 21.6 minutes of total outage or 50,000 failed requests per 100M requests.
  • SLA (Service Level Agreement): A legal contract with customers specifying consequences (service credits, refunds, termination rights) if reliability falls below a looser threshold (e.g., 99.9%).

Instead of treating every error as a failure, an error budget treats reliability as a spendable asset. If the budget is healthy, teams ship fast and run chaos experiments. If the budget is exhausted, non-emergency feature releases pause until reliability work restores margin.

Core Pillars:

  • SLI (Service Level Indicator) is the raw ratio: good events divided by valid total events (e.g., HTTP responses with status < 500 and latency < 300ms).
  • SLO (Service Level Objective) is the target percentage over a rolling or calendar window (e.g., 99.95% over 30 days = 21.9 minutes of allowed downtime).
  • Error Budget = 100% - SLO; when remaining budget hits zero, feature deploys freeze and engineering shifts to reliability fixes.
  • SLAs (Service Level Agreements) are external contracts with financial remedies (e.g., 10% service credit below 99.9%) and must always be looser than internal SLOs.
  • Multi-window, multi-burn-rate alerting (e.g., 14.4x burn over 1h AND 5m) catches fast outages in minutes while ignoring brief, harmless spikes.
Error Budget Policy

SLO Error Budget Governance State Machine

multi-window burn > 2xremaining budget <= 0%rolling window recoversBUDGET HEALTHYBurn rate < 1xELEVATED BURN2x-6x burn alertBUDGET EXHAUSTEDFeature freeze -> reliab

Error budgets convert reliability into a quantitative currency that balances feature velocity against operational stability.

02
STAGE 02 · WHY WE NEED ITL4 · FUNDAMENTALS

Why we need SLO, SLA & Error Budgets (and what fails without it).

Why this matters: The problem: see what breaks without SLO, SLA & Error Budgets under real concurrency or scale.

Without quantified reliability targets, product teams push risky releases until an outage forces a reactive freeze, or ops teams block all changes in pursuit of an unaffordable 100% uptime. A 99.9% monthly SLO allows 43.8 minutes of downtime (or 100,000 failed requests out of 100M), turning reliability from an emotional argument between Dev and Ops into a shared, measurable budget.

Common Pitfalls:

  • Copying an external SLA (99.9%) directly as the internal SLO with zero safety margin.
  • Counting client-side 4xx errors (400 Bad Request, 404 Not Found) as server failures in the availability SLI.
  • Averaging latency across endpoints instead of using histogram percentiles (p95/p99) per critical user journey.
Engineering Decision Framework
Problem
How to implement SLO, SLA & Error Budgets without hitting unbounded tail latency, state divergence, or operational fragility.
Naive Solution
Use a single unpartitioned path with unbounded retries and synchronous global coordination.
Why It Fails
Global coordination serializes throughput under load, while unbounded retries amplify transient stalls into full outages.
Alternatives
Compare synchronous strict-consistency paths against bounded asynchronous replication, local caching, or partitioned ownership.
Engineering Decision
If latency budgets leave no room for synchronous retries, SLA & Error Budgets, set your internal SLO tighter than your external SLA so your error budget triggers engineering intervention before customer credits or contract breaches happen.
Trade-Offs
Gains predictable p99 latency and fault isolation in exchange for explicit bounding, observability, and slightly higher implementation complexity.
Decision Exercise · Make the Call

When SLO, SLA & Error Budgets experiences a sudden 5x traffic spike alongside a slow downstream dependency, which engineering choice best protects system stability?

Failure Mode

Mitigation: Use Google SRE multi-window, multi-burn-rate alerts (e.g., page only if 1h burn >= 14.4x AND 5m burn >= 14.4x, consuming 2% of the 30-day budget in 1 hour).

Failure Mode

Mitigation: Define composite SLIs combining availability (non-5xx) AND latency (under threshold) measured as close to the client or API gateway as possible.

Failure Mode

Mitigation: Add a minimum request volume guard (e.g., sum(rate(http_requests_total[1h])) > 10) or pad with synthetic blackbox probes.

03
STAGE 03 · WHERE IT IS USEDL5 · APPLIED DESIGN

Where SLO, SLA & Error Budgets is used (and where to avoid it).

Why this matters: Scope boundary: identify where this pattern fits best and where simpler or async alternatives win.

Think of Where SLO, SLA & Error Budgets is used (and where to avoid it) as the intuition layer for SLO, SLA & Error Budgets: Scope boundary: identify where this pattern fits best and where simpler or async alternatives win.

SLO, SLA & Error Budgets delivers the highest leverage at well-defined architectural boundaries. Use it for operating customer-facing APIs, payment gateways, or SaaS platforms where reliability and feature velocity directly compete.

ChoiceWhat it buysWhat it costs
Production Fit #1Operating customer-facing APIs, payment gateways, or SaaS platforms where reliability and feature velocity directly compete.Early-stage prototypes or pre-product-market-fit MVPs with a handful of test users where instrumentation overhead outweighs signal.
Production Fit #2Enforcing automated deployment gates (e.g., Argo Rollouts, Spinnaker) and multi-window burn-rate alerts in Prometheus or OpenTelemetry.Offline, best-effort batch scripts or internal ad-hoc tooling with no downstream consumers or latency expectations.
Production Fit #3Negotiating realistic tier guarantees with enterprise customers by backing external SLAs with stricter internal SLOs.Low-traffic endpoints (<10 requests/minute) where a single failed health check or transient blip immediately blows a short-window error budget.
Checkout API Canary Gating with Error BudgetsRequires strict operational guardrails and observability.
Enterprise SaaS SLA vs. Internal SLO BufferRequires strict operational guardrails and observability.
04
STAGE 04 · HOW IT IS MANAGEDL5 · APPLIED DESIGN

How SLO, SLA & Error Budgets works under the hood & reference implementation.

Why this matters: Operational control: configure bounds, failure handling, and safe production defaults.

Concrete walkthrough Consider an Order Checkout API serving 2,000 req/s (~5.184 billion requests per 30-day rolling window) with a 99.95% availability + latency SLO (status < 500 and duration <= 300ms).

  1. Budget calculation: 0.05% * 5.184B = 2,592,000 allowed bad requests per 30 days (or 86,400 bad requests/day at steady load).
  2. Burn rate definition: A burn rate of 1x consumes 100% of the 30-day budget in exactly 30 days (0.05% error rate). A burn rate of 14.4x (0.72% error rate) consumes 2% of the monthly budget in 1 hour and would exhaust the entire month in 50 hours.
  3. Multi-window alerting (Sloth / Prometheus): At 14:00 UTC, a database connection-pool leak pushes the bad-request ratio to 0.9% (18x burn rate).
  • Both the 1-hour window and 5-minute short window exceed 14.4x burn rate by 14:06 UTC.
  • Alertmanager pages the primary on-call engineer via PagerDuty (Severity: Page).
  1. Automated mitigation & budget accounting: At 14:14 UTC, the engineer rolls back the bad deployment. Total incident duration is 14 minutes at 18x burn, consuming 14m * 18 / 43,200m = 0.58% of the monthly budget.
  2. Reset prevention: Because the 5-minute window drops back below 14.4x immediately after rollback, the page auto-resolves without flapping, leaving 99.42% of the monthly budget intact.

The idea Every production system faces a permanent tension between shipping speed and stability. SLIs, SLOs, and Error Budgets replace subjective arguments with a shared mathematical contract:

  • SLI (Service Level Indicator): A carefully defined quantitative measure of service behavior, almost always expressed as a ratio: Good Events / Valid Events (excluding 4xx client errors or health-check noise). Example: proportion of /v1/orders HTTP requests returning < 500 within 250ms.
  • SLO (Service Level Objective): The target reliability threshold for an SLI over a measurement window (typically 28 or 30 rolling days). Example: 99.95% over 30 days.
  • Error Budget: The inverse of the SLO (100% - SLO). For a 99.95% SLO over 30 days (43,200 minutes), the budget is 0.05%—exactly 21.6 minutes of total outage or 50,000 failed requests per 100M requests.
  • SLA (Service Level Agreement): A legal contract with customers specifying consequences (service credits, refunds, termination rights) if reliability falls below a looser threshold (e.g., 99.9%).

Instead of treating every error as a failure, an error budget treats reliability as a spendable asset. If the budget is healthy, teams ship fast and run chaos experiments. If the budget is exhausted, non-emergency feature releases pause until reliability work restores margin.

Design Trade-Off

How SLO, SLA & Error Budgets works under the hood & reference implementation

Before · Unbounded Coupling
  • No backpressure on spikes
  • Implicit shared state
  • Cascading tail latency
After · Bounded & Observable
  • Explicit capacity budgets
  • Isolated failure domains
  • Predictable p99 latency

Reference implementation (Python — Idempotent Bounded Retry with Exponential Backoff)

# Production-safe bounded retry with full jitter (Python)
import random, time
def execute_with_retry(fn, max_attempts: int = 4, base_delay_s: float = 0.05):
    for attempt in range(max_attempts):
        try:
            return fn()
        except TransientError:
            if attempt == max_attempts - 1:
                raise
            cap = base_delay_s * (2 ** attempt)
            time.sleep(random.uniform(0.0, cap))

Operational Guidelines

  • Core mental model: Set your internal SLO tighter than your external SLA so your error budget triggers engineering intervention before customer credits or contract breaches happen.
  • Avoid trap: Copying an external SLA (99.9%) directly as the internal SLO with zero safety margin.
  • Avoid trap: Counting client-side 4xx errors (400 Bad Request, 404 Not Found) as server failures in the availability SLI.
  • When to reach for it: Operating customer-facing APIs, payment gateways, or SaaS platforms where reliability and feature velocity directly compete.
05
STAGE 05 · ALTERNATIVESL6 · SCALE & TRADE-OFFS

Alternatives & trade-offs for SLO, SLA & Error Budgets.

Why this matters: The trade-off: compare competing approaches across latency, consistency, and operational cost.

Think of Alternatives & trade-offs for SLO, SLA & Error Budgets as the intuition layer for SLO, SLA & Error Budgets: The trade-off: compare competing approaches across latency, consistency, and operational cost.

Evaluating SLO, SLA & Error Budgets against alternatives requires balancing latency, operational overhead, failure blast radius, and cost. Each additional 'nine' cuts allowed monthly downtime by 10x (from 43.8 min to 4.38 min), satisfying strict enterprise workloads.

Lifecycle & Failure Recovery

Alternatives & trade-offs for SLO, SLA & Error Budgets

admitsucceedbudget exceededInitializedProcessingInvariant MetDegraded Fallback
ChoiceWhat it buysWhat it costs
Target Tightness (99.9% vs. 99.99%)Each additional 'nine' cuts allowed monthly downtime by 10x (from 43.8 min to 4.38 min), satisfying strict enterprise workloads.Requires multi-region active-active replication, automated failover, and conservative release freezes that can double infrastructure and ops costs.
Rolling vs. Calendar WindowsA 30-day rolling window smoothly ages out old incidents and keeps teams accountable every day rather than resetting magically on the 1st.Calendar windows (1st–31st) are harder to game-proof operationally, though they align better with monthly customer billing and SLA credit cycles.
Request-Based vs. Time-Based SLIsRequest-based SLIs (good requests / total requests) weight peak-hour outages accurately when 10x more users are affected.Time-based SLIs (good minutes / total minutes) are simpler to compute for low-traffic services where request counts fluctuate wildly.
06
STAGE 06 · PRODUCTION ARCHITECTUREL7 · STAFF / PRINCIPAL

Production architecture & hardening for SLO, SLA & Error Budgets.

Why this matters: Production architecture: see how the components compose end to end under real load.

Failure modes

  • Dependency Chain Multiplication: If your API synchronously calls three downstream services each with a 99.9% SLO, your combined ceiling is 0.999^3 = 99.7% unless you add fallbacks, caches, or async queues.
  • Reset Lag on Single-Window Alerts: Alerting on a single 1-hour window keeps firing for up to 55 minutes after an outage is fixed; always pair with a short window (1/12th of the long window).
  • Metric Cardinality Explosion: Adding user_id or request_id labels to Prometheus SLI histograms crashes TSDB memory. Restrict SLI labels to service, route, method, and status_class.
  • Silent Client-Side Failures: Measuring SLIs only inside the origin pod misses DNS failures, TLS handshake drops, and CDN/ALB 502s. Measure at the edge or via synthetic probes.

Practical checklist

  • [ ] Identify 1–3 critical user journeys per service (e.g., login, checkout, search) rather than tracking every internal route.
  • [ ] Express every SLI as good_events / valid_events excluding 4xx client errors and health-check noise.
  • [ ] Set internal SLOs strictly tighter than external SLAs (e.g., 99.95% SLO for a 99.9% SLA).
  • [ ] Implement multi-window, multi-burn-rate alerts using Sloth or Pyrra in Prometheus (1h/5m at 14.4x, 6h/30m at 6x).
  • [ ] Add a minimum traffic threshold on burn-rate alerts so low-volume overnight periods don't trigger false pages.
  • [ ] Publish a written Error Budget Policy defining exact deploy-freeze triggers and executive override rules.
Multi-Window Burn Rate Alerting

Fast-Burn vs Slow-Burn SLO Alert Pipeline

SLI MetricsPrometheus RuleOn-Call PagerRelease Gate1. good_events / total_events2. 14.4x burn (1h & 5m) -> Page!3. 3x burn (6h & 30m) -> Ticket4. Halt non-critical deploys untilrecovery

Dual-window burn-rate alerts catch sudden outages fast without paging on-call for brief, self-healing blips.

07
STAGE 07 · PROBLEMS SOLVED & FURTHER DEEP DIVEL7 · STAFF / PRINCIPAL

Problems solved by SLO, SLA & Error Budgets & Related Concepts.

Why this matters: Applied problems: connect these internals to concrete system design and debugging scenarios.

Think of Problems solved by SLO, SLA & Error Budgets & Related Concepts as the intuition layer for SLO, SLA & Error Budgets: Applied problems: connect these internals to concrete system design and debugging scenarios.

Apply SLO, SLA & Error Budgets to real-world engineering problems and explore adjacent architectural concepts below.

Practice · Explain the consequences

Practice: Make the trade-off yourself.

Question 1 of 3
Score: 0/3

For a 30-day 99.9% availability SLO (43.2 minutes of allowed downtime), why is a 14.4x burn-rate alert evaluated over both a 1-hour and a 5-minute window?

Recommended Learning Flow