Why SLOs instead of just monitoring?
If you’ve spent enough time in operations, you’ve likely lived through this scenario: you have hundreds of alerts, dashboards everywhere, and yet when something breaks… nobody really knows if users are actually impacted.
SLOs (Service Level Objectives) flip that mindset completely. Instead of monitoring everything, we ask: what experience are we promising to our users?
“Hope is not a strategy.” — Google SRE Book
The Three Pillars
SLIs (Service Level Indicators)
An SLI is a quantitative measure of some aspect of the level of service provided. The most common ones are:
- Availability: Proportion of successful requests
- Latency: Proportion of requests served faster than a threshold
- Throughput: Requests processed per second
- Error rate: Fraction of requests that fail
# Example: Availability SLI in Prometheus
- record: sli:availability:ratio_rate5m
expr: |
sum(rate(http_requests_total{code!~"5.."}[5m]))
/
sum(rate(http_requests_total[5m]))
SLOs (Service Level Objectives)
An SLO is the target value or range of values we set for an SLI. For example:
| Service | SLI | SLO |
|---|---|---|
| API Gateway | Availability | 99.9% (monthly) |
| API Gateway | Latency p99 | < 200ms |
| Payment Service | Availability | 99.99% (monthly) |
Error Budget
The Error Budget is the difference between 100% and your SLO. If your SLO is 99.9%, your error budget is 0.1%.
# Error budget in minutes (30-day month)
slo = 99.9
total_minutes = 30 * 24 * 60 # 43,200 minutes
error_budget_minutes = total_minutes * (1 - slo / 100)
print(f"Error budget: {error_budget_minutes:.1f} minutes")
# Output: Error budget: 43.2 minutes
Implementation with Prometheus
Here is where theory turns into practice. Let’s look at how to implement multi-window SLO burn rate alerting with Prometheus:
# prometheus-rules.yml
groups:
- name: slo-rules
rules:
# SLI: Availability (5m window)
- record: sli:http_availability:ratio_rate5m
expr: |
1 - (
sum(rate(http_requests_total{code=~"5.."}[5m]))
/
sum(rate(http_requests_total[5m]))
)
# SLO burn rate alert (fast burn)
- alert: SLOBurnRateHigh
expr: |
(
sli:http_availability:ratio_rate1h < (1 - 14.4 * 0.001)
and
sli:http_availability:ratio_rate5m < (1 - 14.4 * 0.001)
)
for: 2m
labels:
severity: critical
annotations:
summary: "High SLO burn rate detected"
Conclusion
SLOs are not just metrics — they are an engineering contract across teams about how much risk is acceptable. Implementing them properly transforms the dynamic between product development and platform operations, turning “we want more features” vs “we need more stability” into a data-driven decision.
In the next post, we’ll look at how to build Error Budget dashboards in Grafana that actually drive engineering decisions.
Have questions or want to share how you implemented SLOs in your organization? Find me on X.