Stage 4 · Reliability · Medium · 15 min
Observability, SLOs and error budgets
Know your system is unhealthy before users tell you: metrics, logs and traces, the golden signals, percentiles, and service level objectives with error budgets.
What each interview level is expected to know
Learn first: Latency, throughput and availability, Cascading failures, load shedding and backpressure
In AI systems: Cost and latency, Evaluation and observability
After this lesson you can:
- Measure the golden signals with metrics, logs and traces.
- Set an SLO on what users feel, and spend the error budget on purpose.
- Alert on how fast the budget is burning, not on every spike.
Start here
See it in 60 seconds
An error budget, spent
An SLO such as 99.9% leaves a small error budget of failure; the team spends it on purpose and alerts when it burns too fast.
Scene 1 of 6 · Pick a target
The team sets an SLO: over 30 days, 99.9% of requests must succeed within 300 ms.
- SLO target
- 99.9%
- Budget left
- not shown yet
- Pick a target. The team sets an SLO: over 30 days, 99.9% of requests must succeed within 300 ms.
- The rest is budget. The other 0.1% is the error budget: about 43.2 minutes of total failure in 30 days.
- An outage spends it. A 20-minute outage spends 20 of those minutes, leaving about 23.2 for the rest of the period.
- How fast it burns. Burn rate compares spending with a pace lasting 30 days; at 14.4 times it, 2% goes hourly.
- Page on fast burns. So page a person when the budget burns fast, not for every short blip of errors.
- Spend it on purpose. Budget left means the team can ship risky changes; no budget left means slow down and fix reliability.
- Now you try. How many minutes of total failure has the service had in these 30 days? For example: 35 minutes uses 81% of the budget, leaving about 8.2 minutes. Most of the budget is gone, so risky changes should wait for now.
Scene 1 of 6: Pick a target. The team sets an SLO: over 30 days, 99.9% of requests must succeed within 300 ms.
Key points
- An SLO is a target for what users feel, such as requests that succeed quickly.
- The error budget is what the target allows to fail: about 43.2 minutes in 30 days at 99.9%.
- Burn rate says how fast the budget is going; page a person only when it burns fast.
- Budget left means the team can take risks; an empty budget means fix reliability first.
In plain words
Say checkout gets slow at 9 p.m. Metrics tell you something is wrong: the error rate jumped. Traces tell you where: the payment service is slow. Logs tell you why: calls to the bank are timing out. A (A target for how reliable a service should be, such as 99.9% of requests succeeding.) (SLO) says what "good enough" means, such as 99.9% of requests succeeding within 300 ms over 30 days. That leaves 0.1% that may fail, called the (The failures an SLO still allows. At 99.9%, that is 1 failed request in 1,000.). Over 30 days it comes to about 43 minutes of total failure.
In practice an alert fires on a metric, and you open a trace from that minute to find the slow service. Its logs then show the exact error. Many teams turn the error budget into a rule: while some is left, ship features; once it is spent, fix reliability first. Watch the (The time within which 99 out of 100 requests finish. The slowest 1% take longer.) as well as the average. An average can look fine while 1 user in 100 waits for seconds.
The problem it solves
Averages hide pain. A service averaging 50 ms can still make one user in a hundred wait three seconds. Without (The wait that a given share of requests beat. The 99th percentile, p99, is the wait that 99 in 100 requests are faster than.), alerts and traces, nobody notices until the complaints arrive.
Why it matters
A design is not finished until you can say how you would know it is healthy. The failures in this course first show up as a number that moves: an error rate, a slow percentile, a growing (A waiting line for work. One part adds messages, and another takes them off and handles them later, at its own pace.). A team that does not measure those numbers learns of an outage from its users.
A worked example
An SLO of 99.95% success over 30 days allows about 0.05% of that time to fail. Thirty days is 30 × 24 × 60 = 43,200 minutes. The error budget is then 0.05% × 43,200 ≈ 21.6 minutes, about 22 minutes of allowed failure across the whole month.
Think of it like…
Think of a hospital ward. The beeping monitor is a metric: something is wrong. Walking from bed to bed to find the source is a trace: it shows where. The patient's chart is a log: it says why.
Where this analogy stops working
Three tools for three questions is the useful part. But a ward records every patient in full. A busy service cannot afford that: it keeps a sample of traces and drops most logs. So the one request you need may not have been recorded.
Try it
See it working
Also try: Queues & backpressure
Mechanics
How it works
The pictures use this page's SLO: 99.9% of checkout requests succeed over 30 days, so the error budget is about 43 minutes. The first shows how the (How many times faster than sustainable a service is spending its error budget. A burn rate of 1 uses the whole 30-day budget in exactly 30 days.) decides who is told. The second follows one slow request by its trace id.
Measure the golden signals
Four numbers describe a service's health. Google's Site Reliability Engineering ( (Site reliability engineering: running live systems with software methods, such as error budgets and automation. The name comes from Google.)) book calls them the golden signals. (How long one request takes, from sending it to getting the answer.) is how long requests take, read as percentiles such as (The time within which half of all requests finish.) and p99. Traffic is how many requests arrive, and errors is how many fail. Saturation is how full the busiest resource is, such as a (One line of work inside a running program. A server runs many threads, so it can work on many requests at the same time.) pool at 90%.
Set SLOs on what users feel
Pick something a user would notice, such as requests that succeed within 300 ms. Then set a target below 100%, such as 99.9% over 30 days. This target is the SLO. Do not aim for 100%: each extra nine allows a tenth of the failure, and reaching it costs more each time.
Spend the error budget on purpose
99.9% over 30 days allows about 43 minutes of total failure. That is the error budget. A 20-minute outage spends 20 of them and leaves about 23. While budget is left, the team can ship risky changes. When it is gone, reliability work comes first.
Alert on burn rate
Pick a case to follow belowWith this case: 1.44% failing is a burn rate of 14.4. It spent 2% of the budget in one hour, so a person was paged.
Checkout, SLO 99.9%, NOW Checkout SLO 99.9% 1.44% failing NOW Monitor, reads the error rate Monitor reads the error rate On-call engineer, gets pages, tickets On-call engineer gets pages, tickets - Checkout — SLO 99.9% — healthy — NOW — 1.44% failing
- Monitor — reads the error rate — healthy
- On-call engineer — gets pages, tickets — healthy
- Error count
- Call
Step 1 of 3Step 1 of 3 · Checkout
Watch: 1.44% of checkout requests start to fail
- What happens
- The SLO allows 0.1%. Checkout reports its counts of good and failed requests to the monitor.
- Why
- Say a bad setting broke one payment option.
- What changes
- The monitor compares the failure rate with the budget.
- Next
- The burn rate is 14.4
Requests failing1.44%0.1% allowedBurn rate–not read yetBudget spent0%of about 43 minutesAlertnonenothing yetStep 1 of 3: Checkout. 1.44% of checkout requests start to fail. The SLO allows 0.1%. Checkout reports its counts of good and failed requests to the monitor.
Burn rate is how fast the budget is being spent. A rate of 1 uses it up in exactly 30 days. A rate of 14.4 uses 2% of it in one hour, and all of it in about two days. Page a person for a fast burn, and open a ticket for a slow one.
In the picture, 1.44% of requests fail. 1.44% ÷ 0.1% gives a burn rate of 14.4, which spends 2% of the budget in an hour. At that pace it is gone in about 50 hours, so a person is paged.
With 0.2% failing, the burn rate is 2. After a day 6.7% is spent, and the budget would run out in 15 days. That opens a ticket, and nobody is woken.
Trace requests across services
User, presses Pay User presses Pay Checkout, the edge, NOW Checkout the edge trace t-91 NOW Payment, charges the card Payment charges the card Bank, outside service Bank outside service - User — presses Pay — healthy
- Checkout — the edge — healthy — NOW — trace t-91
- Payment — charges the card — healthy
- Bank — outside service — healthy
- Call
- Timeout
Step 1 of 4Step 1 of 4 · Checkout
Done: Checkout gives the request the trace id t-91
- What happens
- The request arrives at the first service, which makes up a new id for it.
- Why
- One id lets every service file its record of this request under the same name.
- What changes
- From now on, every call for this request carries t-91.
- Next
- Checkout calls payment, passing t-91
Trace idt-91Checkout took–Payment took–Bank call took–not back yetStep 1 of 4: Checkout. Checkout gives the request the trace id t-91. The request arrives at the first service, which makes up a new id for it.
What these pictures simplify. These pictures use steady error rates and one stated trace. Real alert rules often check two windows, such as one hour and five minutes, so a page stops soon after the errors do. The observability lab above runs live traffic against an SLO.
Give each request a trace id at the edge, and pass it along on every call. Each service records how long its part took, under that id. Put together, the records show one request's path and where the time went.
In the picture, checkout gives a slow request the id t-91 and passes it to payment, which calls the bank. Checkout took 2,300 ms, payment 2,200 ms, and the bank call 2,000 ms before it timed out.
Each record includes the calls below it, so the bank call is where the time went. Payment's log line has t-91 in it and says why: "bank (The time a caller waits before giving up on a call and treating it as failed.)".
Log with context, sample the volume
Write logs as fields, not free text, and include the trace id, so a log line can be found from a slow trace. A busy service produces more logs and traces than it is worth keeping. Keep a sample, such as 1 in 100, and keep every one that had an error.
Use it when
- Every service that real users depend on: add the signals to the design, not after the first outage.
- Before you pick a timeout or a (A cap that limits retries to a share of normal traffic, so retrying never adds unbounded extra load.): both should come from the measured p99 latency, not a guess.
- Deciding whether to ship or to fix: the error budget turns that argument into a number.
Skip it when
- Logging every request body in full: storage grows fast, and personal data ends up in the logs.
- Paging on a cause such as CPU at 80%: people are woken for things users do not notice. Page on what users feel, such as failed requests.
- An SLO of 100%: it leaves no budget for deploys or for failures outside your control.
Check yourself
Judgement
Trade-offs and how it fails
What you give up
- Visibility
- More metrics, labels and traces make incidents faster to debug.
- Cost
- Every signal is stored and paid for. A label with many values, such as a user id on a metric, multiplies the stored data. Add traces kept for every request, and the monitoring can cost more than the service it watches.
Failure modes
- Alert fatigue: hundreds of noisy alerts, so the one that matters is ignored.
- Too many label values: a metric labelled by user id becomes one series per user. With a million users that is a million series, and the monitoring system slows down or falls over.
- Monitoring that fails with the system: the metrics run in the same region as the service. When that region goes down, the dashboards and alerts go down with it.
In the real world
- Google's Site Reliability Engineering book describes error budgets: when a service has spent its budget, releases stop until it is reliable again.
- Google's SRE workbook suggests paging at a burn rate of 14.4, which spends 2% of a 30-day budget in one hour. Source: Google SRE workbook: Alerting on SLOs (checked 14 October 2026)
- OpenTelemetry is an open standard for traces, metrics and logs. Code written in many languages can send all three in one format.
- Prometheus and Grafana are widely used for metrics and dashboards. Jaeger and Grafana Tempo store traces.
Trade-offs to be ready to discuss: Sampling vs full fidelity · Symptom alerts vs cause alerts
Check yourself
Interview
What interviewers look for
- After the high-level design, add: "We'd track p99 latency and error rate per service against an SLO, and trace requests end to end."
- Say percentiles, not averages, whenever you talk about latency.
- Tie paging to the error budget: "We page when the budget burns fast, not on every spike."
- Give the budget as a number: "99.9% over 30 days is about 43 minutes of failure."
Say it out loud: Why page on SLO burn rate rather than on every spike in errors?
Expected depth by interview level
Levels describe the depth interviewers probe, not years of experience. Choose a level on the learning path to highlight it.
- JuniorUseful
- Logs and basic metrics.
- MidExpected
- Percentiles, dashboards, alerts on errors.
- SeniorCore
- SLOs, error budgets and tracing across services.
- StaffCore
- The operating cost of the design: on-call, rollback, alert quality.
Practice
Apply it
Three harder questions
The first two use the idea on a new case. The last asks you to judge a design.
Apply it
Apply it
Judge a design
Go deeper
Sources and further reading
First-hand sources to check this page against and to go further. They are standards, official docs, original papers, and guides from engineering and security teams. Each link was opened on 8 November 2026.
- Engineering guideService Level ObjectivesGoogle SRE bookHow Google picks what to measure, sets targets for it, and why 100% is the wrong target.
- Engineering guideImplementing SLOsGoogle SRE workbookA worked example from first metric to error budget policy.
- Official docsObservability primerOpenTelemetry documentationLogs, metrics and traces, and how a trace links the steps of one request.