SRE Principles: Service Level Indicators (SLIs)

A Service Level Indicator (SLI) is a carefully defined, quantitative measure of some aspect of the level of service that is provided to users.
The Universal SLI Formula
Most reliable SLIs are expressed as the ratio of good events to total valid events, yielding a percentage between 0% and 100%:
\[\text{SLI} = \frac{\text{Good Events}}{\text{Total Valid Events}} \times 100\%\]
Why Express SLIs as Percentages?
- Intuitive: Universal scale across all services and infrastructure layers.
- Composable: Easily feeds into Service Level Objectives (SLOs) and Error Budget calculations.
- Consistent Alerting: PromQL multi-window burn rate alert rules work identically across disparate systems.
Primary Categories of Request/Response SLIs
| Indicator | Good Events Definition | Total Valid Events |
|---|---|---|
| Availability | Requests that return HTTP status codes < 500 (success). |
All valid incoming HTTP requests. |
| Latency | Requests served in less than threshold \(T\) (e.g. \(\le 200\text{ms}\)). | All valid incoming HTTP requests. |
| Correctness | Data records processed matching expected validation schemas. | Total records processed. |
| Freshness | Background batch jobs completed within \(X\) minutes of deadline. | Total scheduled batch jobs. |
| Coverage | Data sets successfully indexed or replicated. | Total data sets requested. |
Where to Measure SLIs?
graph LR
Client["1. Client-Side (Browser/Mobile)"] --> Edge["2. Edge / CDN / Load Balancer"]
Edge --> App["3. Application Metrics (Prometheus)"]
App --> Logs["4. Server Access Logs"]
- Edge / Load Balancer: Captures 100% of incoming user traffic closest to reality without application overhead.
- Application Server Metrics: Low-latency internal timers capturing deep business transactions.
- Synthetic Probes: Automated user-journey tests verifying complex multi-step workflows.
Limit Your SLIs
Do not measure dozens of indicators. Focus on the 4 Golden Signals (Latency, Traffic, Errors, Saturation). Choose 2-3 high-impact SLIs per user journey to keep cognitive load low.