Scrivio Interview library
ConceptIntermediate7 min read · updated 12 November 2026

Define SLI, SLO and error budget for a checkout API, and explain how multi-window, multi-burn-rate alerting works.

An SLI is a measured indicator, for checkout the fraction of requests that succeed in under 500 ms. An SLO is a target for that SLI over a window, such as 99.9 percent over 30 days, and the error budget is the failure it allows, here 0.1 percent of checkout requests in the window. Burn rate is how fast we are spending that budget; multi-window, multi-burn-rate alerting pages only when both a long and a short window show a high burn rate, which catches fast outages quickly, slow burns later, and produces far fewer false alarms.

Why this question is asked

Service level objectives turn the vague question is the service reliable enough into a number that engineers and product owners can agree on and act on. They are also the basis of good alerting: instead of paging on CPU or individual errors, we page when users are being hurt fast enough to matter. Interviewers ask this to check that we can define the terms precisely and, especially, that we understand the burn rate arithmetic behind modern alerting. In this answer, we will define SLI, SLO and error budget for a checkout API, compute the indicator from Spring Boot metrics, explain burn rate with numbers, and build the multi-window, multi-burn-rate alert.

1SLI: What We Measure

A service level indicator is a measurement of something users care about, expressed as the share of good events out of all events. For a checkout API, users care that checkout works and is not slow, so a good event is a checkout request that returns a non-5xx response in under 500 ms. The SLI is then good requests divided by all requests, a number between 0 and 1.

Defining it as a ratio of events, rather than as a percentile, is deliberate. Ratios add up correctly across instances and over time, and they map directly to a budget of bad events. With Micrometer, we get it from the http.server.requests histogram by making sure there is a bucket exactly at 500 ms.

Java
# application.properties: guarantee a bucket boundary at 500 ms
management.metrics.distribution.slo.http.server.requests=500ms
# SLI over the last hour (PromQL): good / total
sum(rate(http_server_requests_seconds_bucket{uri="/checkout", status!~"5..", le="0.5"}[1h]))
/ sum(rate(http_server_requests_seconds_count{uri="/checkout"}[1h]))
# -> 0.9993 (99.93 percent of checkout requests were good this hour)

2SLO and Error Budget: The Target and the Allowance

A service level objective is a target for the SLI over a window. For checkout we choose 99.9 percent over a rolling 30 days. The window matters: it smooths out single bad minutes and matches how users and the business think about reliability.

The error budget is simply what the SLO allows to fail: 100 percent minus 99.9 percent, so 0.1 percent of checkout requests in 30 days. If checkout handles 10 million requests a month, the budget is 10,000 bad requests. If they all came from a full outage, it would be about 43 minutes of complete failure. The budget turns reliability into something we can spend: a risky migration, a bad deployment or a dependency outage all draw from it, and when it is nearly gone, the team slows down and invests in reliability instead.

Checkout SLO in numbers
TermCheckout valueMeaning
SLIgood / totalnon-5xx and under 500 ms
SLO99.9 percent over 30 daysthe target
Error budget0.1 percent of requests10,000 bad of 10 M
Budget as full outageabout 43 minutes0.001 x 30 days
Burn rate 1budget lasts exactly 30 dayssustainable
Burn rate 14.4budget gone in about 50 hourspage now

3Burn Rate: How Fast the Budget Is Used

Burn rate is the current error rate divided by the error rate the SLO allows. A burn rate of 1 means we are failing exactly at 0.1 percent, so the budget runs out at the end of the 30 days, which is acceptable. A burn rate of 10 means we fail at 1 percent and would use the whole budget in 3 days.

The useful property of burn rate is that it links a short observation to the long window. If we see a burn rate of 14.4 for one hour, we have used 14.4 hours' worth of budget out of 720 hours in 30 days, which is 2 percent of the whole month's budget in that single hour. That is the kind of statement that justifies waking someone.

Text
allowed error rate = 1 - 0.999 = 0.001
observed error rate = 0.0144 (1.44 percent of checkouts bad)
burn rate = 0.0144 / 0.001 = 14.4
budget used in 1 hour = 14.4 x 1 h / 720 h = 0.02 // 2 percent of the month's budget
time to exhaust = 720 h / 14.4 = 50 h

4Multi-Window, Multi-Burn-Rate Alerting

A single threshold on error rate has two problems. A low threshold over a short window fires on every brief blip; a high threshold over a long window notices a real outage too late. The multi-burn-rate approach uses several alerts with different speeds: a fast one with a high burn rate over a short period for outages, and a slower one with a lower burn rate over a longer period for steady degradation.

The multi-window part fixes a second problem. A one-hour window keeps showing a high burn rate for up to an hour after the problem was fixed, so the alert would keep firing. So each alert also requires a short window, about one twelfth of the long one, to be above the same burn rate. The long window proves the problem is significant; the short window proves it is still happening. A common set, from Google's SRE workbook, is shown below.

Text
# Page: fast burn. 14.4 over 1 h AND over 5 min (uses 2 percent of budget in 1 h)
(
(1 - checkout:sli:ratio_rate1h) > (14.4 * 0.001)
and
(1 - checkout:sli:ratio_rate5m) > (14.4 * 0.001)
)
# Page: medium burn. 6 over 6 h AND over 30 min (5 percent in 6 h)
# Ticket: slow burn. 1 over 3 days AND over 6 h (10 percent in 3 days)
# checkout:sli:ratio_rate1h etc. are recording rules holding the SLI over each window
Step throughHow the fast-burn alert decides
  1. Compute SLI over 1 h and over 5 minRecording rules
  2. 1 h burn rate above 14.4?
    YesSignificant: check short windowNoNo page
  3. 5 min burn rate above 14.4?
    YesPage: still happeningNoNo page: already recovering
  4. On-call opens the runbookDashboard, recent changes, rollback

4 steps in order. Play them, or step through them one at a time.

Both windows must agree before anyone is woken up.

5Why This Gives Fewer False Alarms

The design catches a full outage fast: if checkout fails completely, the error rate is 100 percent, a burn rate of 1,000, and the one-hour window crosses 14.4 within about a minute, with the five-minute window agreeing at once. A slow leak, such as 0.3 percent errors from one bad instance, never reaches 14.4, but at burn rate 3 it trips the slow-burn rule within hours and creates a ticket before the month's budget is gone.

Meanwhile short blips do not page, because they do not use enough budget to cross the long window's threshold, and recovered incidents stop alerting quickly, because the short window drops first. In practice that is the difference between pages that always mean real user impact and the noise of fixed thresholds.

6Follow-up questions

Why 500 ms and 99.9 percent and not something stricter?

The numbers come from what users notice and what the business needs, measured from data. If checkout is fine for users at 800 ms, a 500 ms target wastes effort; if the service already achieves 99.97 percent, a 99.9 percent SLO leaves room for change. Targets should be reviewed with product owners and adjusted as we learn.

What do we do when the error budget is spent?

That should be agreed in advance in an error budget policy. Typically the team pauses risky releases for that service, focuses on reliability work from recent incidents and only ships fixes until the budget recovers. The policy makes the trade-off a shared decision rather than an argument during an incident.

Should the SLI be measured at the service or at the load balancer?

Closer to the user is better, because it includes the proxy, network and queueing problems the service cannot see. Many teams start with service metrics because they are easy and move the SLI to the gateway or load balancer later, or use both.

7Conclusion

In this answer, we defined the checkout SLI as the share of requests that return a non-5xx response in under 500 ms, the SLO as 99.9 percent over 30 days, and the error budget as the remaining 0.1 percent of requests. Burn rate is the observed error rate divided by the allowed one, and it tells us how much of the month's budget a short period consumes. Multi-window, multi-burn-rate alerting pages when both a long and a short window exceed a high burn rate, ticketing slower burns, which catches outages quickly and slow degradation later with far fewer false alarms.

What to say in the interviewAbout 90 seconds aloud

Open with

For checkout, I'd define the SLI as the share of checkout requests that return a non-5xx response in under five hundred milliseconds, good events over total events. In Spring Boot I'd add an SLO bucket at 500 milliseconds to http.server.requests so the backend can count good requests exactly.

Then, if they want more

The SLO is the target for that SLI over a window, say 99.9 percent over thirty rolling days. The error budget is what's left, 0.1 percent of requests, so with ten million checkouts a month, ten thousand bad ones, or about forty-three minutes of total outage.

Burn rate is how fast we're spending that budget: the observed error rate divided by 0.001. A burn rate of one uses the budget exactly over thirty days; 14.4 for an hour uses two percent of the month's budget in that hour.

Multi-burn-rate alerting has a fast alert, like 14.4 over one hour, and slower ones, like 6 over six hours, plus a ticket for 1 over three days.

Multi-window means each alert also requires a short window, about a twelfth of the long one, to be above the same rate, so we only page if the problem is both significant and still happening. That catches full outages within minutes, slow burns within hours, and avoids paging on blips or after recovery.

About this answer

Last updated
12 November 2026
Checked
Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
Where the question comes from
Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer

Copy the line below and send it to the author with what you found. It carries the address of this page.

Issue with "Define SLI, SLO and error budget for a checkout API, and explain how multi-window...": https://scrivio-interview-library.netlify.app/spring-boot/observability/b679be03f8/