service-level objective (SLO)
A service-level objective, or SLO, is a target value or range for some measurable aspect of a service, such as availability or response time. It turns a vague promise like “the API should be reliable” into a number the team commits to and can check against, for example 99.9 percent of requests succeeding over a rolling thirty-day window.
The thing being measured is a service-level indicator, or SLI, the raw metric itself. The SLO is the goal set on top of it. Google’s SRE book frames the SLI as “a carefully defined quantitative measure” and the SLO as “a target value or range of values for a service level that is measured by an SLI.” These pieces, plus the error budget and the service-level agreement (SLA), fit together like this:
The gap between an SLO and perfection is the team’s error budget. A 99.9 percent target over thirty days leaves a small, explicit allowance for failure:
>>> slo = 0.999
>>> window_minutes = 30 * 24 * 60
>>> error_budget_minutes = (1 - slo) * window_minutes
>>> round(error_budget_minutes, 1)
43.2
So three nines a month works out to about forty-three minutes of downtime the team can spend before the objective is at risk.
How It Shows Up in Practice
A Python developer meets SLOs as the targets wired into a service’s dashboards and alerts. The numbers come from observability data, and an alert usually fires when the service is burning its error budget fast enough to put the objective at risk.
A good SLO measures what users actually feel, such as successful page loads, rather than something convenient but irrelevant like CPU usage. Common SLO types cover availability, latency, and error rate. Teams keep the count of objectives small, because every SLO is a promise someone has to watch and defend.
SLO vs. SLA
An SLO is an internal target. A service-level agreement, or SLA, is the external version, a contract with customers that attaches consequences, often refunds or service credits, to missing the objectives it contains.
Because breaking an SLA costs real money, teams deliberately set their internal SLOs stricter than the SLA promises, which leaves a buffer to react before a customer-facing commitment is breached. The service-level agreement entry covers how that contract and its penalties work.
Related Resources
Tutorial
Logging in Python
If you use Python's print() function to get information about the flow of your programs, logging is the natural next step. Create your first logs and curate them to grow with your projects.
For additional information on related topics, take a look at the following resources:
- Add Logging and Notification Messages to Flask Web Projects (Tutorial)
- Python Timer Functions: Three Ways to Monitor Your Code (Tutorial)
- Profiling in Python: How to Find Performance Bottlenecks (Tutorial)
- Profiling Performance in Python (Course)
- Logging Inside Python (Course)
- Logging in Python (Quiz)
By Martin Breuss • Updated June 22, 2026