SLOs and Error Budgets in System Design Interviews: When to Use Them
In a system design interview you will often be asked to justify why you chose a certain replication factor, why you added a cache, or why you limited write throughput. A concise way to frame those decisions is with Service Level Objectives (SLOs) and the accompanying error budget. An SLO is a one-sentence promise you make to users—e.g., "99.9% of read requests return within 100 ms"—and the error budget is the amount of failure you are allowed while still meeting that promise.
Why SLOs Exist: The Problem They Solve
Large services rarely achieve perfect uptime. Without a clear target, teams argue over whether a 0.5 % outage is acceptable, and product managers push new features while ops teams scramble to fix flaky components. An SLO turns that vague discussion into a concrete number that both sides can measure.
Concrete System Example: A Photo-Sharing Service
Imagine a service that stores and serves user photos. Users expect their pictures to load quickly, but occasional spikes in traffic are inevitable. If you promise "99.9% of photo fetches complete within 200 ms", you have an SLO that can be tracked with latency histograms. The error budget is the 0.1 % of requests that are allowed to exceed 200 ms or fail outright each month.
How SLOs and Error Budgets Work: Step-by-Step
- Define the User-Facing Metric – Choose latency, error rate, or availability that matters to the user. For the photo service, latency is the primary metric.
- Pick a Time Window – Typically a month or a quarter. The window determines how many requests you can afford to miss.
- Set the Target – Decide the acceptable percentile (e.g., 99.9th percentile latency) and the threshold (200 ms). This becomes the SLO.
- Calculate the Error Budget – Subtract the SLO target from 100 %.
- Example: 100 % – 99.9 % = 0.1 % error budget.
- Instrument the Service – Emit metrics (e.g.,
request_latency_ms) to a monitoring system like CloudWatch or Prometheus. - Monitor Consumption – Track the cumulative error budget consumption over the window. If you consume 80 % of the budget by day 20, you must prioritize reliability over new features.
- Use the Budget for Decision-Making – When a new feature would increase latency, ask: "Will this push us over the remaining error budget?" If yes, defer or add mitigation (e.g., a cache).
Where SLOs Show Up in Classic Interview Questions
| Interview Question | Where the SLO Appears | Typical Follow-up |
|---|---|---|
| Design a URL Shortener | Define a latency SLO for redirects (e.g., 99.95% < 50 ms). | How does the error budget affect replication strategy? |
| Design a Real-Time Chat Service | Set an SLO on message delivery latency (e.g., 99.9% < 200 ms). | What happens when the error budget is exhausted? |
| Design a Video Streaming Platform | Use a latency SLO for start-up time (e.g., 99.9% start within 2 s). | How would you trade off bitrate improvements against the error budget? |
In each case, the SLO is introduced when you discuss latency or uptime, and the error budget drives the conversation about scaling, caching, or throttling.
Trade-offs and the Alternative Interviewer May Probe
When you bring up an SLO, interviewers often probe the cost of meeting it. Common angles:
- Higher Replication vs. Cost – Achieving 99.99% availability may require three AZs and synchronous writes, increasing latency and expense.
- Feature Velocity vs. Reliability – A larger error budget lets you ship features faster but risks user dissatisfaction if the budget is spent early.
- Alternative: Hard SLA – Some interviewers ask whether you would use a contract-level SLA instead of an internal SLO. An SLA is a legal promise to customers; it typically includes penalties and requires stricter monitoring. Explain that SLOs are internal tools to prevent SLA breaches.
30-Second Pitch You Can Say Out Loud
"An SLO is a measurable reliability target—like 99.9% of requests finishing under 200 ms. The error budget is the tiny slice of failures we’re allowed each month. By tracking the budget, we decide when to prioritize reliability over new features, and we can justify replication or caching choices with concrete numbers."
Common Mistakes Candidates Make
- Treating the Error Budget as a Free Pass – Saying "We have 0.1 % slack, so we can ignore occasional spikes" shows you don’t understand that the budget is a limit, not a license.
- Omitting the Time Window – Without a month-long window, the SLO cannot be measured, and the budget calculation is meaningless.
- Mixing Metrics – Using availability and latency in the same SLO without clarifying which metric drives the budget confuses the interview.
- Ignoring Burn-Down – Failing to discuss how you would react when the budget is near exhaustion suggests you haven’t thought about incident response.
How to Practice This
- Study the worked design of a metrics monitoring platform in the System Design AI library, the kind of system that collects the measurements an SLO is tracked with.
- Create your own canvas for a different service—say a chat app. Write an SLO, calculate the error budget, and plot a burn-down curve.
- Run a mock interview with a peer. Explain the SLO, answer follow-up questions about trade-offs, and rehearse the 30-second pitch.
Questions people ask
What is the difference between an SLO and an SLA?
An SLO is an internal reliability target you monitor; an SLA is a contractual promise to customers that may include penalties if the SLO is not met.
How do you decide which percentile to use for an SLO?
Pick the percentile that reflects user expectations—high-traffic, latency-sensitive services often use the 99.9th percentile, while less critical services may use 95th.
Can a service have more than one SLO?
Yes. You can define separate SLOs for latency, error rate, and availability, each with its own error budget.
What should you do when the error budget is exhausted early?
Shift focus to reliability: stop non-essential feature work, investigate root causes, and revisit whether the target is realistic if the budget keeps running out.