# SLIs, SLOs and Error Budgets

> Define reliability in terms users care about, set explicit targets, and use the remaining error budget to balance speed and stability. Free notes, key...

Canonical: https://www.internhack.in/roadmaps/tracks/devops/slo-error-budgets
Last updated: 2026-11-28

Define reliability in terms users care about, set explicit targets, and use the remaining error budget to balance speed and stability.

Intermediate · about 4 hours · difficulty 3/5

Learn first: [Alerting That Does Not Burn People Out](https://www.internhack.in/roadmaps/tracks/devops/alerting)

"Make it reliable" is not a target. **Service level objectives** turn reliability into a number that product and engineering agree on.

### Vocabulary

- **SLI (indicator)**: a ratio of good events to valid events, measured from the user's point of view. Examples: fraction of requests that return non-5xx in under 300 ms; fraction of jobs completed within 10 minutes.
- **SLO (objective)**: the target for an SLI over a window, such as 99.9% over 28 days.
- **SLA (agreement)**: a contract with customers and penalties, usually looser than the internal SLO.
- **Error budget**: 100% minus the SLO. At 99.9% over 30 days you may be "bad" for about 43 minutes.

### Choosing good SLOs

- Start from critical **user journeys** (log in, search, pay), not from every component.
- Measure as close to the user as possible: load balancer logs or synthetic probes beat host metrics.
- 100% is the wrong target; each extra nine costs far more and users cannot tell.
- Begin with what you achieve today and tighten later.

### Using the budget

- Budget left: ship faster, run experiments, do risky migrations.
- Budget exhausted: an agreed **error budget policy** kicks in, such as a feature freeze or reliability work taking priority.
- Alert on **burn rate**: how fast the budget is being consumed, with a fast window for outages and a slow one for gradual decay.

Tools such as **Sloth** or **Pyrra** generate Prometheus rules from SLO definitions, and most observability vendors support SLOs natively.

**Good enough to move on:** you can write an SLI as a good/valid ratio, calculate the error budget for a given SLO, and set up a multi-window burn-rate alert.

## Key concepts

- **SLI, SLO and SLA**
- **User journeys and good/valid ratios**
- **Error budget math**
- **Error budget policies**
- **Burn-rate alerting**
- **Sloth and Pyrra**

## Mini project

Define availability and latency SLOs for your demo API, generate Prometheus recording and burn-rate alert rules (by hand or with Sloth), and build a Grafana panel showing budget remaining.

## Check yourself

Your service has a 99.95% monthly SLO and already had a 15-minute outage. Roughly how much budget remains, and what might your policy say?

## Free resources

- [Service Level Objectives (SRE Book)](https://sre.google/sre-book/service-level-objectives/) (Google SRE)
- [Implementing SLOs (SRE Workbook)](https://sre.google/workbook/implementing-slos/) (Google SRE)
- [Alerting on SLOs (SRE Workbook)](https://sre.google/workbook/alerting-on-slos/) (Google SRE)

Previous: [Alerting That Does Not Burn People Out](https://www.internhack.in/roadmaps/tracks/devops/alerting) · Next: [Incident Response and On-Call](https://www.internhack.in/roadmaps/tracks/devops/incident-response)

## More in Observability: Metrics, Logs, Traces and SLOs

- [Observability Fundamentals](https://www.internhack.in/roadmaps/tracks/devops/observability-fundamentals)
- [Prometheus and Grafana](https://www.internhack.in/roadmaps/tracks/devops/prometheus-grafana)
- [Centralised Logging with Loki](https://www.internhack.in/roadmaps/tracks/devops/loki-logging)
- [Elastic Stack (ELK) and OpenSearch](https://www.internhack.in/roadmaps/tracks/devops/elk-stack)
- [Distributed Tracing with OpenTelemetry](https://www.internhack.in/roadmaps/tracks/devops/tracing-opentelemetry)
- [Alerting That Does Not Burn People Out](https://www.internhack.in/roadmaps/tracks/devops/alerting)
- [SLIs, SLOs and Error Budgets](https://www.internhack.in/roadmaps/tracks/devops/slo-error-budgets)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [DevOps Engineer Roadmap](https://www.internhack.in/roadmaps/tracks/devops)
