A Little Bit TechA Little Bit Tech
OBSERVABILITY13 min read

SLIs, SLOs and Error Budgets: Measuring Reliability Users Actually Notice

What service level indicators, objectives and error budgets are, how to choose and set them, how to use the budget in release decisions, and how burn-rate alerts turn an objective into pages worth answering.

By Mark Poulton

Three linked panels define the terms: an SLI measuring the proportion of good checkout requests, an SLO setting a 99.5% target over 30 days, and an error budget allowing 0.5% to fail. Beside them, a chart of the remaining error budget over 30 days falls slowly, drops sharply during an incident where a burn-rate alert fires, then levels off once the problem is fixedThree linked panels define the terms: an SLI measuring the proportion of good checkout requests, an SLO setting a 99.5% target over 30 days, and an error budget allowing 0.5% to fail. Beside them, a chart of the remaining error budget over 30 days falls slowly, drops sharply during an incident where a burn-rate alert fires, then levels off once the problem is fixed

A service level indicator (SLI) is a measurement of how well a service is working for its users, usually the proportion of requests or events that were good. A service level objective (SLO) is the target for that measurement over a period, such as "99.5% of checkout requests succeed over 30 days". The error budget is the shortfall the objective allows: the 0.5% that may fail before the target is missed.

Together they turn "is the service reliable enough?" from an argument into a number that engineering, product and operations teams have agreed in advance. That number then drives two things: release decisions, because a spent budget is a signal to slow down and fix reliability, and alerting, because paging on how fast the budget is burning catches problems users notice and ignores those they don't.

This article explains how to choose SLIs, set realistic SLOs, use the error budget, and alert on burn rate. It assumes you already collect metrics; if not, start with logs, metrics and traces explained.

What is the difference between an SLI, an SLO and an SLA?

TermWhat it isExampleWho it is for
SLI (indicator)A measurement of service behaviour, expressed as good events divided by valid eventsProportion of checkout requests that returned a non-error responseEngineers and operators
SLO (objective)A target for an SLI over a defined window99.5% of checkout requests succeed over a rolling 30 daysThe service team and its stakeholders
Error budgetThe allowed shortfall: 100% minus the SLO0.5% of checkout requests may fail in 30 daysAnyone deciding between features and reliability work
SLA (agreement)A contract with consequences, such as service credits, if a level is missed99% monthly availability, or a 10% creditCustomers, legal and finance

The important distinction is between an SLO and an SLA. An SLA is a promise to customers with a penalty attached; an SLO is an internal target that the team manages against. SLOs should be stricter than any SLA covering the same service, so the team gets warning and acts well before a contractual line is crossed. Many services have SLOs but no SLA at all.

The definitions follow the Google SRE book chapter on service level objectives, which remains the standard reference.

How do you choose good SLIs?

The most useful SLIs share three properties:

  • They reflect what users experience. "Requests succeeded" and "pages loaded quickly" matter to users. CPU utilisation and queue depth do not, at least not directly. Those are causes, which belong on dashboards.
  • They are measured as close to the user as practical. A server can report success while users see failures from a load balancer, a CDN or the network in between. In rough order of fidelity: client-side or real-user measurement, synthetic tests from where users are, the load balancer or API gateway, then the application itself. The load balancer is often the best balance of accuracy and effort.
  • They are a ratio of good events to valid events. Expressing every SLI as a proportion between 0% and 100% makes SLIs comparable, makes the error budget straightforward to calculate, and avoids percentile maths that cannot be combined across instances or time windows.

The SLI for any type of service can be written the same way:

SLI = good events ÷ valid events × 100%

where:

  • valid events are the events that count towards the measurement, such as all checkout requests, excluding health checks and requests rejected because the client sent invalid input
  • good events are the valid events that met the definition of success, such as returning a non-error response within the time limit

Most services need only a few SLI types:

SLI typeGood-event definitionExample SLOCommon mistake
AvailabilityRequest completed without a server error or timeout99.5% of checkout requests succeed over 30 daysCounting client errors (4xx) as failures, or ignoring timeouts that never reach the server
LatencyRequest completed faster than a threshold95% of checkout requests complete within 800 ms over 30 daysAveraging latency, which hides the slow tail users actually feel
FreshnessData read was updated more recently than a threshold99% of dashboard reads show data less than 10 minutes oldMeasuring when the pipeline job ran rather than how old the data users see is
CorrectnessOutput matched the expected result99.9% of sampled invoices match an independent recalculationAssuming success means correct; a fast, successful wrong answer is still a failure
CompletenessExpected records were processed within the window99% of daily orders appear in the warehouse by 6amCounting jobs that finished, not records that arrived

Request-driven services such as APIs and websites usually need availability and latency. Data pipelines usually need freshness, correctness and completeness. Start with one or two SLIs for each critical user journey, not one for every component. A journey such as "customer completes checkout" may cross ten services, but users experience it as one thing.

Why a ratio rather than a percentile?

"p95 latency below 800 ms" and "95% of requests complete within 800 ms" sound equivalent, and over one window for one instance they nearly are. The ratio form is better in practice for three reasons:

  • counts of good and valid requests can be added up across instances, regions and time windows, whereas percentiles cannot be averaged
  • the error budget falls out directly: 5% of requests may be slower than 800 ms
  • it matches how latency is usually recorded, as histogram buckets. If you use Prometheus histograms, make sure one bucket boundary sits exactly at the threshold, such as le="0.8", or the SLI cannot be calculated precisely

How do you set an SLO?

Start from current performance and what users tolerate, not from a round number. "Five nines" (99.999%) allows about 26 seconds of failure a month. Few services need it, and almost none achieve it without large investment in redundancy and process. Choosing it anyway produces an objective that is always breached and is soon ignored.

A practical sequence:

  1. Measure the SLI for a few weeks before committing to a target, so you know what normal looks like.
  2. Ask what users notice. Support tickets, complaints, abandoned journeys and conversations with product owners reveal where the real tolerance is. A nightly reporting job and a payment API have very different needs.
  3. Set the first SLO at or slightly below current performance, so it is achievable and protects today's experience from getting worse. Tighten it later if users need more.
  4. Account for dependencies. A service cannot be more reliable than the critical services it calls without redundancy or graceful degradation. If a dependency offers 99.9%, an SLO of 99.95% for a service that fails when it fails is a wish.
  5. Write it down with an owner, the SLI definition, the data source and the window, and review it every quarter.

The size of the error budget each target implies is a useful sanity check. Over a 30-day window:

SLOError budgetEquivalent full outage in 30 days
99%1%7.2 hours
99.5%0.5%3.6 hours
99.9%0.1%43.2 minutes
99.95%0.05%21.6 minutes
99.99%0.01%4.3 minutes

Each additional nine cuts the budget by a factor of ten, and the cost of achieving it usually rises much faster than that. The outage column is only a way to picture the budget; for a request-based SLI, partial failures over a longer period consume the same budget.

Which window should you choose?

The window is the period over which the SLO is evaluated.

  • A rolling window, such as the last 28 or 30 days, reflects what users have recently experienced and never resets suddenly. It suits operational decisions and alerting. A 28-day window always contains four of each weekday, which avoids weekly traffic patterns skewing the result.
  • A calendar window, such as each month or quarter, aligns with business reporting and SLAs, but a bad incident on the last day of the month disappears from view on the first day of the next.

Most teams use a rolling window for running the service and report calendar figures to stakeholders. The SRE Workbook chapter on implementing SLOs discusses the trade-offs in more depth.

How do error budgets work in practice?

The error budget turns reliability into something the team can spend. While budget remains, the team can release features, run experiments and accept some risk. When the budget is spent, the priority shifts to reliability until it recovers.

The arithmetic is simple:

Error budget = (1 − SLO) × valid events in the window

Budget remaining = 1 − (bad events so far ÷ error budget)

where SLO is written as a decimal (99.5% is 0.995), valid events in the window is the number of requests or events the SLI counts over the SLO window, and bad events are valid events that were not good.

What makes an error budget useful is an error budget policy: a short document, agreed in advance between the service team, product owners and leadership, that says what happens at each level of budget. For example:

Budget remainingWhat happens
More than 50%Normal releases. Planned risk, such as migrations and experiments, can go ahead
25–50%Releases continue, but the team reviews what consumed the budget and schedules fixes
Less than 25%Only low-risk changes and reliability fixes. Risky migrations are postponed
ExhaustedFeature releases pause until the SLI is back within objective, except for urgent security and bug fixes

The policy matters more than the exact thresholds. Without it, a spent budget is just a red number on a dashboard; with it, the decision about whether to ship on Friday has already been made. The example error budget policy in the SRE Workbook is a reasonable starting template.

Error budgets also help prioritise work in the other direction. A service that never uses more than a fraction of its budget may be over-engineered for its objective, and that effort could go elsewhere, or the team can afford to release faster.

What should not count against the budget?

Decide this before the first incident, not during it. Common choices are to exclude planned maintenance announced in advance and failures caused by clients misusing an API, while including failures of dependencies, cloud providers and the network. Users do not care whose fault an outage was, and excluding dependency failures removes the incentive to design around them.

How do you alert on an SLO?

Alerting whenever the SLI dips below the objective for a few minutes is too sensitive, and alerting only once the budget is gone is far too late. The established approach is to alert on burn rate: how fast the budget is being consumed compared with the rate that would use it exactly by the end of the window.

Burn rate = observed bad-event ratio ÷ (1 − SLO)

where the observed bad-event ratio is bad events divided by valid events over the alert's look-back window. A burn rate of 1 uses the whole budget in exactly one SLO window. A burn rate of 10 uses it in a tenth of the window.

Budget consumed = burn rate × alert window ÷ SLO window

So with a 30-day (720-hour) SLO window, a burn rate of 14.4 sustained for one hour consumes 14.4 × 1 ÷ 720 = 2% of the budget.

The SRE Workbook chapter on alerting on SLOs recommends multi-window, multi-burn-rate alerts. Each alert checks a long window, so that enough budget has been spent to matter, and a short window, so that the alert stops firing soon after the problem is fixed. Fast burns page someone; slow burns open a ticket. The window and burn-rate combinations, and how they keep paging volume down, are covered in from alert fatigue to actionable signals.

Tools can generate these rules from an SLO definition rather than leaving you to write them by hand. Open source generators such as Sloth and Pyrra produce Prometheus recording and alerting rules, the OpenSLO project defines a vendor-neutral format for SLO definitions, and most commercial observability platforms have SLO features built in.

Illustrative example: a checkout API

The following example is illustrative. The numbers are chosen to make the arithmetic easy to follow, not taken from a real service.

An online retailer's checkout API handles about 100,000 valid requests a day, or 3,000,000 over a rolling 30-day window. The team measures at the load balancer and sets two SLOs:

  • Availability: 99.5% of checkout requests complete without a server error (5xx) or timeout.
  • Latency: 95% of checkout requests complete within 800 ms.

The error budgets are:

  • Availability budget: (1 − 0.995) × 3,000,000 = 15,000 failed requests in 30 days
  • Latency budget: (1 − 0.95) × 3,000,000 = 150,000 slow requests in 30 days

For the availability SLO, the fast-burn page fires when the bad-event ratio exceeds 14.4 × 0.005 = 7.2% over both the last hour and the last five minutes. At that rate the whole 30-day budget would be gone in about 50 hours (720 ÷ 14.4), and the hour it took to trigger has already used 2% of it.

In Prometheus, recording rules calculate the bad-event ratio once for each window, and the alert compares both windows with the threshold:

groups:
  - name: checkout-sli
    rules:
      - record: checkout:request_errors:ratio_rate1h
        expr: |
          sum(rate(http_requests_total{service="checkout",code=~"5.."}[1h]))
          /
          sum(rate(http_requests_total{service="checkout"}[1h]))
      - record: checkout:request_errors:ratio_rate5m
        expr: |
          sum(rate(http_requests_total{service="checkout",code=~"5.."}[5m]))
          /
          sum(rate(http_requests_total{service="checkout"}[5m]))
      - record: checkout:request_latency_good:ratio_rate1h
        expr: |
          sum(rate(http_request_duration_seconds_bucket{service="checkout",le="0.8"}[1h]))
          /
          sum(rate(http_request_duration_seconds_count{service="checkout"}[1h]))

  - name: checkout-slo-alerts
    rules:
      - alert: CheckoutAvailabilityFastBurn
        expr: |
          checkout:request_errors:ratio_rate1h > (14.4 * 0.005)
          and
          checkout:request_errors:ratio_rate5m > (14.4 * 0.005)
        labels:
          severity: page
          team: payments
        annotations:
          summary: "Checkout is failing fast enough to exhaust its 30-day error budget in about two days"
          runbook_url: "https://wiki.example.com/runbooks/checkout-availability"

The latency recording rule produces the good-event ratio for the latency SLI; its own burn-rate alerts would follow the same pattern with a budget of 0.05. Two simplifications are worth stating: this query treats every non-5xx response as good, so timeouts that never reach the service need to be counted from the load balancer, and a production setup would add the slower page and ticket windows as well.

Now suppose a release on day 12 introduces a bug that fails 10% of checkout requests. The burn rate is 0.10 ÷ 0.005 = 20, above the 14.4 threshold, so the page fires within the hour. The team rolls back after 90 minutes in total, by which point about 625 requests (90 minutes of 100,000 a day, at 10%) have failed: roughly 4% of the monthly budget. Without the burn-rate alert, the same bug might have gone unnoticed until customers complained, and running for a day it would have consumed two-thirds of the budget.

The error budget policy then does its job in the review that follows. With 96% of the budget left, releases continue, but the team adds a check for this class of bug to the deployment pipeline. If the same bug had run for a day, the remaining budget would have dropped below 50% and the policy would have prompted a closer look before the next risky change.

How do SLOs apply to network services?

The same approach works for the network, where "available" and "fast" are harder to define than for an API. Useful network SLIs measure what applications and users experience across the path, not device health:

  • the proportion of synthetic tests from each site to key applications that succeed within a latency threshold
  • the proportion of minutes in which a site's path met its latency, jitter and loss thresholds for a class of application, such as voice
  • the proportion of DNS lookups that resolve correctly within a time limit

These SLIs depend on measuring the network path between users and applications, which is the subject of network observability. For organisations that have moved to SD-WAN, network SLOs are also a natural way to express the experience measures described in measuring SD-WAN success.

What are the most common SLO mistakes?

  • Too many SLOs. Dozens of objectives per service dilute attention. Two or three for each critical user journey is usually enough.
  • Targets set by aspiration. An SLO that is always breached carries no information. Base targets on measured performance and user tolerance.
  • Measuring at the wrong place. Server-side metrics miss failures in front of the service. Measure as close to users as is practical.
  • No error budget policy. Without agreed consequences, a spent budget changes nothing.
  • Treating the SLO as permanent. User expectations, traffic and architecture change. Review SLOs regularly, and change them deliberately rather than quietly.
  • Using SLOs to judge individuals or teams. SLOs are a tool for prioritising work. Used as a performance target, they encourage teams to game the definition.

Frequently asked questions

What is the difference between an SLO and an SLA?

An SLO is an internal reliability target the team manages against. An SLA is a contract with customers that carries consequences, such as service credits, if a level is missed. SLOs are normally set stricter than any SLA so that the team has room to act before the contract is breached.

Should an SLO ever be 100%?

No. A 100% target leaves no error budget, so every failure is a breach and any change is a risk. It is also unachievable in practice, because networks, dependencies and users' own devices fail sometimes. Users rarely notice the difference between very high reliability and perfect reliability, but the cost of chasing perfection is large.

How many SLOs should a service have?

Usually one to three, covering the user journeys that matter most. A request-driven service typically needs one availability and one latency SLO. Add more only when they would lead to different decisions.

What happens when the error budget runs out?

Whatever the error budget policy says. Typically, feature releases pause and the team focuses on reliability until the SLI is back within the objective. The point is that the decision was agreed in advance, so it does not need to be argued during an incident.

Are SLOs only for large engineering organisations?

No. A small team can define one SLO for its most important service using metrics it already collects, and get most of the benefit: a shared definition of "good enough", alerts based on user impact, and a reason to say no to risky changes when reliability is already poor.

Conclusion

SLIs, SLOs and error budgets give reliability a shared, measurable definition from the user's side. Choose a few SLIs that reflect what users experience, measured as close to them as you can. Set objectives from real performance, not round numbers. Agree in advance what happens as the budget is spent. Then alert on burn rate, so that pages track user impact rather than every fluctuation, as described in from alert fatigue to actionable signals. The same numbers also give the business case for observability a baseline it can measure improvement against.