• Learn SRE

Service Level Objectives

Introduction

What Is It?

Service Level Objectives (SLOs) are the quantifiable targets your service commits to maintaining. They answer: “How reliable should our service be, and how do we know if we’re meeting that target?”

SLOs are built on two foundational concepts:

Why Was It Created?

Traditionally, operations asked: “Is the system up or down?” This worked for monolithic systems.

Modern systems need:

What Problems Does It Solve?

ProblemSolution
No clarity on reliability targetSLOs define explicit targets based on business impact
Uncertain deployment riskError budgets make risk explicit
No shared language with businessSLOs provide quantifiable metrics (99.9% = 43 min downtime/month)
Burnout from constant alertsSLOs guide what’s critical enough to page on
No framework for stabilize vs. deployError budgets show available budget for changes

Core Concepts: SLI, SLO, SLA, Error Budgets

Service Level Indicators (SLIs)

An SLI is a specific, measurable metric that represents what users care about.

Users don’t care about infrastructure metrics. They care about:

How It Works

Formula:

SLI = (good_events) / (total_events)

Example (API Availability):
SLI = (2xx/3xx responses) / (total requests)
= 995,000 / 1,000,000 = 99.5%

Examples:

Web API:

Good Event: Request returns 2xx/3xx in < 30 seconds
Bad Event: Request returns 5xx OR times out (> 30s)

SLI = Successful requests / Total requests

Database:

Good Event: Query completes in < 100ms, returns correct data
Bad Event: Query times out (> 100ms) OR returns wrong data

SLI = (queries_correct_and_fast) / (total_queries)

Batch Processing:

Good Event: Job completes within 1 hour
Bad Event: Job takes > 1 hour OR fails

SLI = (jobs_completed_on_time) / (total_jobs)
Best Practices
  1. Define SLIs before SLOs
  2. Use 3+ SLIs per service (availability, latency, correctness)
  3. Make SLI definitions public and version-controlled
  4. Measure from user perspective (not internal metrics)
  5. Validate SLI correlates with actual user satisfaction

Service Level Objectives (SLOs)

An SLO is a target you set for an SLI.

SLO = SLI + Target + Time Window

Example: “99.9% of API requests succeed, measured monthly”

Components:

Without SLOsWith SLOs
– Reliability decisions are arbitrary
– No shared expectations
– Can’t discuss reliability vs. cost trade-offs
– Explicit targets everyone agrees on
– Data-driven deployment decisions
– Quantifiable business metric

Example: Choosing an SLO

Service: Authentication API
Criticality: Critical (blocks all user access)

Candidate SLOs:
├─ 99% (3.65 days downtime/year)
│  └─ Too much; users locked out for days
│
├─ 99.9% (8.76 hours downtime/year)
│  └─ Acceptable but risky; users wait hours for retry
│
├─ 99.99% (52 min downtime/year)
│  └─ ✓ Good target; very rare outages
│  └─ Cost: High (redundancy, multi-region)
│
└─ 99.999% (5 min downtime/year)
   └─ Overkill; cost not justified

DECISION: 99.99%
RATIONALE: Auth is critical; cost is justified
Common Mistakes
  1. SLOs too aggressive
    • Target 99.99% but actually do 99.95%
    • Always in “crisis mode”
    • Teams burn out
  2. SLOs too conservative
    • Target 99% but actually do 99.95%
    • Over-investing in reliability
    • Not pushing improvement
  3. Conflicting SLOs
    • API latency p99 < 100ms
    • Cache hit rate > 95%
    • But 5% cache misses = 500ms+ database latency
    • These conflict; impossible to meet both
  4. SLOs without business alignment
    • Target 99.9%
    • Business says downtime costs $50k/min
    • At 99.9%, lose $360k/year to downtime
    • Maybe 99.99% is necessary
Best Practices
  1. Start conservative, tighten gradually
    • Year 1: Measure actual performance
    • Year 2: Set SLO below measured performance
    • Year 3: Tighten as you improve
  2. Include multiple SLIs per SLO
    • Availability AND Latency AND Correctness
    • Service breaches SLO if ANY dimension fails
  3. Document the rationale
    • Why this target?
    • What’s the business impact?
    • When will we revisit?
  4. Different SLOs for different services
    • Payment processing: 99.99%
    • Analytics dashboard: 99%
    • Internal tools: none

Service Level Agreements (SLAs)

An SLA is a legal contract with customers about availability, often with financial penalties.

SLO (Internal Target): 99.95%
  ↓
SLA (Customer Promise): 99.9%
  ↓
Buffer: 0.05%

If you hit 99.9%, SLA is met ✓
If you hit 99.85%, SLA is breached ✗ (credits owed)

Key insight: SLOs > SLAs (internal targets > customer promises)

Example

AWS SLA (Public): 99.95% availability
AWS SLO (Internal): 99.99% availability

This buffer lets AWS do:

Best Practices
  1. Set SLAs below your SLO target (0.5-1% buffer)
  2. Make SLAs public
  3. Include financial credits for missing SLA
  4. Don’t confuse SLA (legal) with SLO (engineering)

Error Budgets

An error budget is the amount of downtime you can tolerate while still meeting your SLO.

Formula

Error Budget = (1 - SLO%) × Total Time in Period

Example (99.9% SLO for 30 days):
= (1 - 0.999) × 30 × 24 × 60 minutes
= 0.001 × 43,200 minutes
= 43.2 minutes per month

Error budget transforms SLOs from abstract to operational. Lets take a case with and without error budgets.

Without error budget:

With error budget:

Real-World Example of Error Budget

E-commerce Checkout Service

SLO = 99.95% Availability, which allows approximately 21.6 minutes of downtime per month.

Week 1 – Normal Operations
Week 2 – Database Migration
Week 3 – Payment Processor Integration
Week 4 – Unexpected Database Failure
Outcome

Most of the error budget has been consumed. The team should prioritize reliability improvements and be cautious with future deployments until service stability improves.

Best Practices
  1. Track error budget in real-time dashboard
  2. Adjust deployment strategy based on budget
    • 80%+ remaining: Aggressive
    • 50-80%: Standard
    • 20-50%: Conservative
    • <20%: Stabilization only
  3. Budget for planned activities
    • Reserve budget for known deployments
    • Always keep emergency buffer
  4. Review monthly and adjust SLO if needed