SLOs and error budgets
Read first: Observability
An SLI is a user-facing measurement, an SLO is the target over a window, and an SLA is a contract with a penalty. The error budget is 1 minus the SLO. For 99.9 percent over 30 days that is 0.1 percent of requests, about 43 minutes only if traffic is steady, and spending 2 percent of the budget in one hour is a burn rate of 14.4.
A reliability target is a fraction of real user events over a window you named before the incident. CPU moving is not that target. The work is to turn 99.9% over 30 days into a budget you can spend, and into a page that fires while some of the budget is still left.
Core concepts
The SLI is the measurement. It is a ratio of good events to valid events. Two you can say in a design review without inventing a product: the fraction of home-page reads that succeed and return in under 300 ms, and the fraction of checkout attempts that complete. The events are user-facing. A valid event is a request you agreed to serve. A shopper sending an empty form is not your availability. Write the numerator and the denominator in a sentence, or the ratio will drift toward whatever is easy to graph.
CPU utilization is not an SLI. Neither is memory, nor thread-pool queue depth. Those are USE signals from observability: how a resource is doing. They are how you explain a miss. They are not what you promised. A box at high CPU can still serve the home page inside 300 ms, and a box at idle CPU can miss every request because it is waiting on a dependency. If you page on CPU you will wake up for the first box and sleep through the second. The user cannot tell what your CPU was. They can tell that the page did not come back.
Duration in the SLI is a percentile story, not a mean. p99 means about 1 in 100 reads is slower than the line. An SLI of “under 300 ms” already picks a line. You still have to say whether a request over that line is a bad event. For this page’s running example, it is. A slow success spends budget the same way an error does, because the promise included the time. A status code of 200 does not make a slow read good. Count it in the numerator’s failure side on purpose, so a latency regression cannot hide inside a sea of HTTP 200s.
The SLO is the target. 99.9% of home-page reads under 300 ms, over 30 days. Both the percentage and the window are the objective. 99.9% over an hour is a different promise from 99.9% over 30 days. The hour one fails if a single bad minute is bad enough. The month one can absorb that minute. People say “three nines” and leave the window off. Then nobody knows which page is faithful to the target.
The SLA is a contract with a penalty. It is what you owe a customer, and what it costs when you miss it. The SLO is the internal target. Set the SLO tighter than the SLA so the internal page happens before you owe the penalty. This page will not invent a price for that penalty. The structure is enough: external promise, internal promise stricter than it, a bill attached only to the external one. An SLO with no SLA behind it is still worth having. It is how you decide whether to ship. An SLA with no SLO in front of it is how you discover the penalty from a customer’s email.
The error budget is 1 minus the SLO. For 99.9% the budget is 0.1% of those requests.
SLO = 99.9% = 0.999
error budget = 1 - 0.999 = 0.001 = 0.1% of valid requests
That 0.1% is the unreliability you are allowed to spend in the window. You spend it on incidents, on bad deploys, and on risks you chose because shipping has value. When it is gone, the honest policy is to stop spending it: fewer risky deploys, more time on the thing that burned it. A budget that never changes a decision is a slogan next to a graph.
You can turn 0.1% into minutes, and you should show the arithmetic and the assumption in the same breath. A day is 86,400 seconds. A 30-day month is:
30 * 86,400 = 2,592,000 seconds
about 2.6 * 10^6 seconds
The interview shortcut of 10^5 seconds a day would have given 3 million. Use 2,592,000 when you are writing it down. The teaching figure of about 2.6 million is that product, rounded.
time budget = 0.001 * 2,592,000 = 2,592 seconds
2,592 / 60 = 43.2 minutes
about 43 minutes
You just converted request success into time. That conversion treats every second as equal, which is fair when traffic is steady and a lie when it is not. A flash sale that puts half the month’s reads into one hour can spend the request budget while the 43-minute clock still looks comfortable. Prefer the request ratio. Use the 43 minutes to feel the size of 0.1%, and say “steady traffic” whenever you say the minutes. The aside does the uneven case in numbers.
Burn rate is how fast you are spending the budget. A rate of 1 means you are on pace to finish the window empty and not before: in one hour you would spend 1/720 of a 30-day budget, and dividing that fraction by 1/720 gives 1. Faster than 1, you empty early. The page people can derive without memorizing a chart is this one. Spending 2% of a 30-day budget in one hour is a burn rate of 14.4, because one hour is 1/720 of 30 days.
30 days * 24 hours = 720 hours
one hour = 1/720 of the window
fraction of the budget spent in that hour = 0.02
burn rate = 0.02 / (1/720) = 0.02 * 720 = 14.4
If that slope held, the budget would last 720 / 14.4 hours. 14.4 times 50 is 720, so 50 hours. You have spent 2% and you have 98% left, and you will have nothing left in about two days if the rate continues. That is a page. You still have time to roll back, to shed, to stop the bleed. Label 50 hours as a derivation from 14.4, not as a second magic constant.
Fast-burn and slow-burn windows are the idea, from the SRE workbook. A short window catches a slope like 14.4, where the budget is in danger in hours. A long window catches a leak that never looks dramatic in one hour and still ends the month at zero, a burn near 1 that a one-hour rule yawns at. This page derives the one number. It does not recite a table of windows, percentages, and ticket severities. If you want a second window, derive it from the budget the same way, in the interview, with the arithmetic visible. Do not perform a memorized grid.
Two pages fail in opposite directions. A page that fires on a single slow minute will page you for noise. A page that waits until the budget is gone will page you after the promise is already broken. Burn rate is the middle: the slope is wrong, and the balance is not yet zero.
A worked example
The SLO, copied on purpose from the definition so the arithmetic stays attached to a real sentence: 99.9% of home-page reads succeed in under 300 ms, measured over 30 days. Traffic is steady. You are allowed to use the 43 minutes, and you say that you are.
How bad is one fully bad minute? There are 30 * 24 * 60 = 43,200 minutes in the window. Under steady traffic one minute is 1/43,200 of the month’s requests. If every read in that minute misses the SLI:
bad fraction of the month = 1 / 43,200
budget fraction = 0.001
share of budget = (1 / 43,200) / 0.001 = 1,000 / 43,200 = 0.02315
About 2.3% of the monthly budget. The same fact in the time picture: the budget is about 43 minutes, and you spent 1 of them, and 1/43.2 is the same 2.3%. The two pictures agree because you assumed steady traffic. They are one fact, not two.
Paging a human for that minute trains the wrong reflex. You spent about 2% of the month’s allowance. If the minute was only partly bad, you spent less. A garbage-collection pause, a noisy neighbor, a single instance restarting, a bad health check that recovered: each can move p99 for 60 seconds and then vanish. Two of those a day is 60 pages in a month. The on-call starts sleeping through them, and the night the burn is real they sleep through that too. The page did not mean “the promise is in danger.” It meant “a minute looked ugly.” That is noise. A fully bad minute is also not nothing. Forty-three of them, spread out, are the entire budget. You count them. You do not wake a person for the first one.
Paging when the budget hits zero is the opposite mistake. You waited until 0.1% of the month’s reads had already missed, which under steady traffic is those 43 minutes already consumed. The page is accurate. It is also late. The users already felt it. If an SLA sits behind this SLO, you may already owe the penalty, because you set the internal target tighter and then alerted at the outside wall anyway. You cannot unspend the budget. The only decision left is apology and a freeze, and you are making it at the moment the freeze stopped being optional.
The page you want on a fast burn is the 14.4 case. In the last hour the home page spent 2% of the 30-day budget. The balance is still about 98%. The slope says 50 hours to empty if nothing changes. You page now. There is something to do: roll back the deploy from the top of the hour, shed a prefetch that is competing with the reads, fail a dependency over. The page means “the rate of spend threatens the window,” not “a graph was red for a short time,” and not “the window is already a loss.”
A slow leak needs a longer look, and it needs to stay a sentence rather than a table. If you are slightly over the allowed error rate all month, burn near 1, no single hour contains 2% of the budget. The one-hour rule stays quiet. At day 30 you are empty and surprised. A long window exists so that kind of leak pages while a slice of budget remains. Derive the threshold from the remaining budget when you write the rule. Do not paste a grid of five windows you saw once. Two ideas are enough: a short window for a slope that empties the month in a couple of days, a long window for a slope that empties it on the last day, and the 14.4 arithmetic as the one you can reproduce from 2% and 720.
Someone will propose paging on CPU instead, because the home-page boxes have a CPU graph and the SLI is “more work.” Refuse it, with both counterexamples, on this service.
The dependency in front of the home page stalls. Checkout is not even involved. CPU on the web boxes goes idle, because threads are waiting on sockets. Duration blows through 300 ms. The SLI burns. A CPU page is silent. Users are staring at a spinner. This is the incident, and the resource graph you trusted is the one that looks healthiest, because a waiting process does not use the processor.
The other way: a batch job on the same host drives CPU hot for an hour, and the home page still returns in under 300 ms because the request path never needed that core. A CPU page fires. The SLI does not move. You woke a person for a machine that kept its promise. They will trust the next CPU page a little less, which is how the first counterexample gets missed later.
CPU stays on the dashboard as a USE panel you open after the SLI page, to explain it. It is not the SLI and it is not the page. The measurement in the objective is the fraction of home-page reads under 300 ms. Anything else is a clue.
flowchart LR
events[Good and bad reads]
sli[SLI ratio]
slo[SLO over 30 days]
budget[Error budget]
burn[Burn rate]
page[Page while budget remains]
events --> sli --> slo --> budget --> burn --> page
The page box is not “any red minute” and not “budget equals zero.” It sits on the burn, which is a slope computed from the budget the SLO defined.
Walk the good hour and the bad hour with the same steady rate so the minutes stay honest. One fully bad minute is 2.3% of the budget. You do not page. An hour that contains 2% of the budget in bad reads is burn 14.4. You page. Notice that a single fully bad minute is already about 2% of the budget, and it is still the wrong page. The difference is the window you measured over. The minute spent its 2% and stopped. The hour spent 2% as a rate you are extrapolating, and the rule is “if this hour is the new normal, we empty in 50 hours.” If the next hour is clean, a rule that needs the burn to sustain will clear. A rule that pages on contact with any ugly minute cannot clear without training people to ignore it. Duration of the ugliness, and whether it is still going, is the whole distinction.
Tradeoffs
| Choice | What you catch | What you get wrong |
|---|---|---|
| Page on one slow minute | Every blip, including the harmless ones | Noise. The on-call sleeps through the real burn |
| Page only when the budget is empty | Almost no false alarm | The page arrives after the window is already lost |
| Short window on a fast burn, like 2% in one hour | A slope that empties a 30-day budget in about 50 hours, while budget remains | A slow leak near burn rate 1 never looks big in that hour |
| Long window on a slow burn | The leak that would end the month at zero | Late for an incident that is spending several percent an hour |
| User-facing SLI, success and latency | Matches the promise the user can feel | You have to define valid events, or client mistakes spend your budget |
| CPU, or any USE metric, as the SLI | An easy graph that is already on the host | Idle while users wait, or hot while the page is fine |
The first two rows are the worked example. The next two are why one window is not a complete policy, stated as choices rather than as a grid of factors. Derive any extra number. Do not recite one.
Pitfalls
- An SLI of CPU, memory, or queue depth. You page when users are fine and you stay quiet when they are waiting on a socket. The graph is real. The promise was a different graph.
- An SLO with no window. “99.9%” over a minute, an hour, and a quarter are three policies. The team will hear the one that makes their incident not count.
- Quoting 43 minutes as if it were the budget, on a service whose traffic is a spike. You will think you have spare minutes while the request ratio is already gone. Say “steady” or do not say the minutes.
- A page on a single slow minute. You manufacture an on-call that ignores pages. The budget math says that minute was about 2% if it was fully bad, and less otherwise.
- A page that waits for an empty budget. Accurate, and after the only useful decisions. The freeze starts when it has already been forced.
- Reciting a multi-window burn table from memory, factors and severities and all. You will misremember a cell, and you did not show you can derive 14.4 from 2% and 720. Derive the one number. Describe fast burn and slow burn in sentences.
- Counting invalid traffic as burn. A client bug that sends a broken request on a loop will empty the budget and page you for their deploy. The denominator is valid events. Write it down.
- An SLA tighter than the SLO. You owe the penalty before your internal target is even supposed to have paged. The internal number is the stricter one.
- A latency SLO that treats a slow 200 as good because the status was success. The promise was 300 ms. The slow success spends the same budget as a timeout, or you have quietly changed the SLI.
In the interview
Say the sentence in the first five minutes, with the numbers: the SLI is the fraction of home-page reads under 300 ms, the SLO is 99.9% over 30 days, the budget is 0.1%, about 43 minutes if traffic is steady. Say you page on burn, not on one ugly minute and not on an empty budget. If they ask how fast is fast, derive 14.4 on the board: 720 hours, 2% of the budget in one hour, 0.02 divided by 1/720. The bottleneck in a reliability question is usually the user-facing path that spends the budget, not the host metric that is easiest to alert on. The honest tradeoff is that a tight SLO pages more and ships less, and a loose one does the reverse. You pick it from the product’s pain, not from a default of three nines.
Skip the multi-window table. If you start reciting five rows of percentages you are performing a chapter. Offer to derive a second window if they want one. The question that usually follows is what you do when the budget is gone, or why you will not page on CPU. When it is gone, you stop the risky deploys and spend the time on the bleed. CPU is a clue you open after the SLI moves. Give the idle-CPU stall and the hot-CPU batch job in two sentences. That is the whole distinction between a USE graph and a promise.
Check yourself
Show that spending 2 percent of a 30-day error budget in one hour is a burn rate of 14.4.
Thirty days is 30 times 24, which is 720 hours. One hour is 1/720 of the window. Burn rate is the fraction of the budget you spent, divided by the fraction of the window that has passed. That is 0.02 divided by 1/720, which is 0.02 times 720, which is 14.4. If that rate held, the budget would last 720 divided by 14.4 hours, and 14.4 times 50 is 720, so 50 hours. The 50 hours is a derivation from 14.4, not a separate rule.
For a 99.9 percent SLO over 30 days, what is the error budget in minutes, and what did you assume to convert requests into time?
The budget is 1 minus 0.999, which is 0.001 of valid requests. Thirty days is 30 times 86,400 seconds, which is 2,592,000 seconds, about 2.6 million. Times 0.001 is 2,592 seconds, which is 43.2 minutes, about 43. You assumed traffic is steady, so a fraction of requests and a fraction of the month are the same fraction. If the traffic is a spike, keep the budget in requests and do not quote the minutes.
One minute of home-page reads all miss the SLI, and traffic is steady. About what share of a 99.9 percent monthly budget did you spend, and why is that a bad page?
There are 43,200 minutes in 30 days. One fully bad minute is 1/43,200 of requests, and the budget is 0.001, so the share is 1,000/43,200, about 2.3 percent. It matches spending 1 minute out of about 43. You do not wake a person for that. A couple of blips a day becomes dozens of pages, and the on-call ignores the night the slope is actually 14.4. Count the minute. Page on the burn, not on contact with a single ugly minute.
Why does a page that fires only after the error budget is gone fail you, even though it is accurate?
The 0.1 percent has already been spent. Users already saw the misses, and if an SLA sits behind the SLO you may already owe the penalty. The useful decisions, roll back, shed, stop shipping risk, belonged earlier, when the burn said the slope would empty the window and the balance was still most of the budget. An accurate page after the loss is a report, not an alarm.
The home-page boxes are idle and the reads are slow, because a dependency stalled. A batch job on another host has the CPU pinned and the page is still fast. Which events should page, and why is CPU the wrong SLI?
Page on the home-page SLI, the fraction of reads under 300 ms. The idle boxes are the incident: users are waiting, CPU will not say so, because waiting does not burn a core. The hot batch host is not the incident: the promise still holds, and a CPU page would train you to distrust pages. CPU is a USE clue you look at after the SLI moves, to explain a miss. It is not the measurement in the objective.
Based on: Google SRE book and SRE workbook.