Chapter 87: Prometheus and Grafana Monitoring
87.9 SLOs and burn rates (awareness)
Story. A Microsoft-style SaaS team in Hyderabad stopped paging on every 5xx blip. They set an SLO: 99.9% of checkout requests succeed over 30 days. Error budget was the remaining 0.1%. They alerted on burn rate — how fast the budget was being spent — so a sharp outage pages quickly, but a tiny drip does not page at 3 a.m. Costs of a full SEV-1 were tracked near $8,000 (about ₹6.6 lakh) in refunds last quarter; the SLO made trade-offs visible.
Why
Threshold alerts on raw CPU create noise. SLOs tie alerts to user happiness and to how much budget you can still spend.
What
- SLI — Service level indicator (for example success ratio).
- SLO — Target for that SLI (for example 99.9% over 30 days).
- Error budget — 100% minus SLO. Room to fail without breaking the promise.
- Burn rate — How fast you are spending the budget. Burn rate 1 means you will exactly exhaust the budget at period end if the rate continues.
- Multi-window burn — Common pattern: short window + long window must both look bad before paging (SRE workbook idea; implement carefully).
How
- Pick one user-facing SLI (success ratio or latency).
- Write the SLO with product and SRE together.
- Graph budget remaining.
- Add burn-rate alerts for fast and slow spends.
- When budget is gone, freeze risky deploys until you recover.
Example 1: Success ratio SLI
sum(rate(http_requests_total{job="checkout",code!~"5.."}[5m]))
/
sum(rate(http_requests_total{job="checkout"}[5m]))
Output
{} 0.997
What it shows: 99.7% success over five minutes. Against a 99.9% monthly SLO this minute is burning budget.
Example 2: Talking about burn in standup
Budget: 0.1% of requests may fail in 30 days.
Fast burn alert: spending budget ~14x so a day-long outage would exhaust the month — page.
Slow burn alert: spending ~2x — create a ticket, do not wake the phone.
What it shows: Severity follows burn speed, not a single raw 5xx count.
Ravindra Bagale's Tip
Start with one SLO on one critical user journey. Ten SLOs on day one create noise again.
एक critical user journey वर एक SLO पासून सुरू करा. पहिल्या दिवशी दहा SLOs = पुन्हा noise.
एक critical user journey पर एक SLO से शुरू करें. पहले दिन दस SLOs = फिर से noise.
Quick quiz
Q1. What is an error budget?
The allowed failure room: 100% minus your SLO.
Q2. What is burn rate?
How fast you are spending that error budget.
Q3. Why not page on every 5xx?
Tiny blips may still fit the budget; burn-rate alerts focus on real risk.
Did you understand? Let us try it once more.