A useful SLO turns reliability from a vague aspiration into a measurable operating decision. This guide shows how to choose service level indicators, set service level objectives, calculate an error budget, compare rolling and calendar windows, and create a policy that helps teams decide when to ship, investigate, or invest in reliability.
Overview
An SLI, or service level indicator, is the measurement used to describe an aspect of user experience. Common examples include successful request rate, latency, freshness of data, and availability. An SLO, or service level objective, is the target applied to that indicator over a defined time window. An SLA is a formal agreement, often with external commitments or consequences, that may use one or more SLO-like targets.
For example, an API team might define an SLI as the proportion of valid requests that receive a successful response within two seconds. Its SLO could be 99.5% over a 30-day window. The corresponding error budget is the amount of unreliability permitted by that objective:
Error budget = 1 − SLO target
For a 99.5% availability SLO, the budget is 0.5% of eligible request events during the selected period. The budget is not permission to create failures. It is a decision-making boundary that helps balance feature delivery with reliability work.
Good SLOs have a clear user relationship, a defined measurement method, an accountable owner, and a policy for what happens when the budget is being consumed. They should also exclude events that are outside the service's responsibility, but exclusions must be explicit and reviewable rather than used to make the results look better.
How to estimate
1. Start with a user-facing journey
Begin with an action users need to complete: loading a dashboard, placing an order, authenticating, reading an object, or submitting a job. Avoid starting with whichever metric your monitoring system already exposes. A CPU graph may be useful for diagnosis, but it is usually not an SLI because users do not experience CPU utilization directly.
2. Choose the event and denominator
Write down the numerator and denominator in plain language. For an availability SLI, the numerator might be valid requests that return an acceptable response, while the denominator is all valid requests received by the service. Decide how to treat cancellations, timeouts, retries, redirects, synthetic checks, and requests rejected by an upstream dependency. The same rules must be applied consistently to both the SLI calculation and its alerts.
3. Set a target and calculate the budget
Use observed service behavior, user expectations, dependency limits, and the cost of failure as inputs. Do not select a target merely because a round number sounds rigorous. A target that is too strict can consume engineering capacity without improving an important user outcome; one that is too loose may fail to trigger useful action.
Convert the target into an event budget when possible. If a service processes 2,000,000 eligible requests in a period and has a 99.5% availability target, the permitted unsuccessful events are:
2,000,000 × (1 − 0.995) = 10,000 events
For time-based availability, the same calculation can be expressed as permitted unavailable time. The exact duration depends on the window. Use the formula rather than relying on a memorized table, especially when the monitoring system uses a rolling period.
4. Define the response before measuring
An SLO without an operating policy is only a dashboard number. Specify who reviews budget consumption, what qualifies as a breach, whether releases are paused, and how exceptions are approved. The policy should distinguish between a temporary burn caused by an incident and a persistent trend caused by normal traffic, capacity, or design limitations.
Inputs and assumptions
Use this SLI-to-SLO worksheet for each important service or user journey:
- Journey: What user action or system contract matters?
- SLI type: Availability, latency, freshness, correctness, throughput, or another measurable outcome.
- Good event: What qualifies as a successful result?
- Total event: Which events belong in the denominator?
- Data source: Logs, metrics, traces, synthetic checks, or a combination.
- Target: The SLO percentage or latency threshold.
- Window: A rolling duration or a fixed calendar period.
- Owner: The team responsible for measurement quality and response.
- Exclusions: Explicitly documented events outside the service boundary.
- Action: The operational response when budget consumption reaches a defined level.
Logs are often useful for request-level success and failure classification, but they require stable fields and careful treatment of missing records. Metrics are efficient for aggregation and alerting, provided counters and labels are defined consistently. Traces can connect a user request to downstream work and help identify where latency or errors originate. OpenTelemetry-based instrumentation can support common telemetry collection, but the semantic conventions and attributes used by a particular implementation should be verified during each instrumentation review.
Latency SLOs need an additional decision: the percentile or proportion being measured. For example, “at least 99% of eligible requests complete within 500 ms” is more precise than “average latency is below 500 ms.” Averages can hide a slow tail. Also define whether the threshold applies to all requests, a request class, or separate tiers such as interactive and background traffic.
For Prometheus-style metrics, a basic availability ratio can be calculated from counters such as:
sum(rate(http_requests_total{status=~"2..|3.."}[5m])) / sum(rate(http_requests_total[5m]))
The label names, acceptable status classes, and recording rules must match the service's instrumentation. For a production SLO, teams commonly aggregate the numerator and denominator over the chosen evaluation window rather than treating a five-minute sample as the complete objective. A query can be technically valid and still represent the wrong user contract, so validate it against known incidents and manually sampled requests.
Rolling versus calendar windows
A rolling window evaluates the most recent period continuously. It reflects current reliability and is useful for ongoing release decisions, but budget recovery can be gradual and less intuitive to explain. A calendar window resets at a defined boundary, such as the start of a month. It is easier to report and align with review cycles, but a reset can make a service appear to have a fresh budget immediately after the boundary.
Choose one approach deliberately. Some organizations use a rolling window for release gating and a calendar view for reporting. If both are used, label them clearly so teams do not confuse a reporting reset with actual recovery.
Worked examples
Availability
Assume an order API records 500,000 eligible requests during a review period. The team chooses a 99.9% availability SLO. The error budget is 0.1%, or:
500,000 × 0.001 = 500 unsuccessful events
If an incident produces 350 unsuccessful requests, it has consumed 70% of the event budget. That result should prompt the team to follow its policy, inspect the cause, and assess whether planned changes add unacceptable risk. It does not automatically prove that all future releases must stop; the agreed policy should define the threshold and the exception process.
Latency
Suppose a search endpoint has a target that 99% of valid searches complete within 400 ms. During the window, 100,000 searches are eligible, and 2,500 exceed the threshold. The successful proportion is 97.5%, so the service has missed the 99% objective and consumed more latency budget than allowed for that period.
Investigate the distribution by endpoint, region, status, dependency, and request size. A single aggregate can identify a problem but rarely explains it. Traces may reveal a slow database call, while logs can show a particular query class. If the SLO is repeatedly missed because the request mix changed, revisit the eligibility rules and target rather than silently changing the measurement.
Error-budget policy template
Scope: This policy applies to the named service and its documented SLOs.
Review: The service owner reviews current budget consumption and recent burn during the normal reliability review and after significant incidents.
Normal budget: Planned delivery continues when the service is within its agreed reliability guardrails, subject to ordinary change review.
Elevated burn: When consumption crosses the team's warning threshold, the owner prioritizes investigation, mitigation, and risk review before high-impact changes.
Budget exhausted: If the objective is breached, the default is to prioritize reliability work and limit changes that increase risk until the team agrees on a documented exception or the policy's recovery condition is met.
Exceptions: Emergency security fixes, compliance work, and urgent customer-impacting changes may proceed with an accountable approver and a recorded rollback or mitigation plan.
When to recalculate
Revisit SLOs during quarterly reliability reviews, after a material incident, when traffic or request mix changes, when a service gains a new dependency, or when users begin relying on a different workflow. Recalculate after changing instrumentation, status classification, sampling, retention, or trace collection, because a measurement change can alter the apparent budget without changing service behavior.
Review formulas and alert thresholds at least annually and whenever your observability platform, OpenTelemetry conventions, Prometheus recording rules, or monitoring terminology changes. Check that dashboards still expose the numerator, denominator, window, and current budget. An alert should lead to an action: for example, a fast-burn alert may page the incident responder, while a slower burn may create a ticket for planned investigation. Thresholds should be tuned against the team's response capacity and the service's risk, not copied without context.
For a practical next step, choose one important journey, complete the worksheet, calculate its budget from a representative window, and test the query against a known incident. Publish the target, assumptions, and policy beside the service dashboard. Then schedule the next review. Reliability targets become useful when teams can explain what they measure, what the remaining budget means, and which decision follows when that budget changes.