SLI Measurement Windows and Aggregation
You'll learn how to turn raw SLI measurements into meaningful reliability metrics by choosing the right time windows and aggregation methods.
The Core Problem
You've defined your SLIs (like request success rate or latency), but raw measurements are just noise. To make reliability decisions, you need to aggregate these measurements over meaningful time windows. The question is: how long should your window be, and what math should you use?
Measurement Windows
A measurement window is the time period over which you collect and combine SLI measurements. Common windows include:
- Rolling windows: Last 30 days, last 7 days, last hour
- Calendar windows: This week, this month, this quarter
Think of it like checking your bank account: checking every second is overwhelming, checking once a year misses important trends. Weekly or monthly windows often hit the sweet spot for reliability.
Aggregation Methods
Once you have measurements in a window, you aggregate them:
Success Rate (Good/Total)
Count successful events divided by total events. Example: 99,500 successful requests out of 100,000 = 99.5% success rate.
Percentiles
For latency SLIs, use p50, p95, p99. "95% of requests completed under 200ms" is clearer than an average that hides outliers.
Averages
Simple but dangerous for latency—a few slow requests can hide behind a good average. Better for availability percentages.
Analogy: Measuring rain. You could count total inches per month (rolling sum), check if it rained each day (success rate), or report "90% of days had less than 1 inch" (percentile).
Key Takeaway: Choose measurement windows that balance freshness with stability, and use success rates for availability, percentiles for latency—avoid averages that mask tail behavior.