Overview
The core philosophy of SRE is: manage reliability through engineering methods. The most important tools are SLI, SLO, and Error Budgets.
SLI: Service Level Indicator
SLI is a quantitative metric for system reliability. Common SLIs include:
- Availability: successful requests / total requests
- Latency: P99 response time < 200ms
- Throughput: QPS > 10000
- Correctness: data consistency check pass rate
Key principle for choosing SLIs: start from the user’s perspective. Users don’t care about your CPU usage — they care whether requests succeed and are fast enough.
SLO: Service Level Objective
SLO is the target value for an SLI. For example:
slo:
availability:
target: 0.999 # 99.9% availability
window: "30d"
latency:
target: 200 # P99 < 200ms
window: "30d"
99.9% availability means approximately 43.8 minutes of allowed downtime per month.
Error Budget
Error Budget is the most elegant SRE design:
- SLO set to 99.9% → Error Budget = 0.1%
- Budget not exhausted: free to ship new features and make aggressive changes
- Budget exhausted: freeze releases, focus on stability improvements
This mechanism turns “stability vs. velocity” from an argument into a quantifiable engineering decision.
Practical Tips
- Start with core services: don’t try to define SLOs for all services at once
- Rough first, refine later: initial SLOs can be based on historical data, then iterated
- Review regularly: monthly review of SLO achievement, adjust unreasonable targets
- Automated alerting: alert based on error budget burn rate, not fixed thresholds
Summary
SLI/SLO/Error Budgets form the measurement foundation of SRE. You can’t manage what you don’t measure — this is what sets SRE apart from traditional operations.