LESSON 2

SRE Fundamentals

Apply site reliability engineering principles: service level indicators, objectives, and agreements, error budgets and their policy, toil, reliability targets that match user needs, and a way to balance reliability and feature work.

Introduction

“Is the system up?” is the wrong question. A system can answer health checks while every import fails. It can be technically available and so slow that users give up. It can be fine for 99 percent of users and broken for the one customer that matters most. What matters is whether users can do what they came to do, quickly and correctly.

Site reliability engineering (SRE) is an approach that treats reliability as an engineering problem with measurable goals. This lesson introduces its core tools: indicators, objectives, error budgets, and the idea that the right level of reliability is a decision, not a default.

It comes before observability on purpose. You must decide what good looks like before you decide what to measure and when to wake someone up.

Learning Objectives

  • Explain service level indicators (SLIs), objectives (SLOs), and agreements (SLAs).
  • Choose SLIs that reflect user experience for the critical journeys.
  • Set realistic SLOs and calculate an error budget.
  • Write an error budget policy that guides decisions.
  • Recognize and reduce toil.
  • Describe the main principles of SRE practice.
  • Use AI to draft and challenge SLIs and SLOs without outsourcing the judgment.

1. The Vocabulary

Term Meaning Example
SLI (service level indicator) A measurement of some aspect of service quality The share of import requests that complete successfully
SLO (service level objective) A target for an SLI over a period 99.5 percent of imports complete successfully, measured over 28 days
SLA (service level agreement) A contract with consequences if missed A customer agreement with credits for downtime
Error budget The amount of unreliability the SLO allows 0.5 percent of imports may fail in 28 days

Keep the distinction clear:

  • An SLI is a measurement; it has no target.
  • An SLO is an internal goal that guides engineering decisions.
  • An SLA is a promise to customers, usually looser than the SLO so that you notice and fix problems before you break the promise.

Not every service needs an SLA. Every service benefits from SLOs.

2. Choose Indicators From the User’s Point of View

Start with critical user journeys (from the QA strategy), then ask what “working” means for each. Good SLIs are expressed as the proportion of good events out of all valid events:

1
SLI = good events / valid events

Common categories:

Category Question SignalDesk example
Availability Did the request succeed? Share of API requests that do not return a server error
Latency Was it fast enough? Share of page loads under 1 second; share of API reads under 300 ms
Correctness / quality Was the result right? Share of imports whose row counts match the file
Freshness Is the data recent enough? Share of imports that finish within 10 minutes of upload
Throughput / completion Did the work finish? Share of queued jobs completed within the expected time
Durability Is data kept? Share of stored records that can be read back; successful restore tests

Rules of thumb:

  • Measure as close to the user as practical: at the load balancer or in the browser, not only inside a service.
  • Prefer a few indicators per journey over dozens. Too many dilute attention.
  • Use percentiles, not averages, for latency. The average hides the slow tail that users feel (lesson 5).
  • Exclude what is not the service’s fault only with care and written rules, such as invalid requests from clients. Do not exclude failures simply because they are inconvenient.
  • For asynchronous work, measure completion within a time, not only success. A job that eventually finishes after three hours may not be “good.”
  • For AI features, measure operational quality (summary generated within a time, provider errors handled) and, where possible, a quality signal such as user feedback or sampled review. A fast summary that is wrong is not reliable.

For each SLI, write a precise specification (what events, where measured, what counts as good) and an implementation (the query or telemetry that produces it). Ambiguity here becomes an argument during an incident.

3. Set Objectives

An SLO combines an SLI, a target, and a window:

1
2
SLO: 99.5% of import jobs complete successfully within 10 minutes,
     measured over a rolling 28 days.

How to choose the target:

  • Start from user needs and business value, not from technical capability. Ask: what level of failure would users notice or complain about? What does an hour of downtime cost?
  • Use history if you have it, and be honest about what you can currently achieve. Setting a target you already miss every month teaches the team to ignore it; set an initial SLO you can meet, then tighten deliberately.
  • Remember dependencies. You cannot be more reliable than what you depend on, unless you design around it. If the model provider offers 99.9 percent, a feature that cannot work without it cannot promise more. Degrade gracefully instead.
  • Avoid chasing nines. The cost of each extra nine rises steeply, and users cannot perceive the difference beyond a point.
  • Differentiate by importance. Signing in and reading summaries may need stricter targets than the export of an old report.
  • Choose a window long enough to smooth noise (commonly four weeks) and short enough to act on.

For a pilot, a small set of SLOs is right: perhaps three to five, covering availability and latency of the API, completion of imports, and the availability of summaries.

Availability target Allowed downtime per 30 days (approx.)
99% 7 hours 12 minutes
99.5% 3 hours 36 minutes
99.9% 43 minutes
99.99% 4 minutes 19 seconds

Seeing the numbers helps the conversation: a 99.99 percent target leaves no room for a single manual deployment or a slow rollback.

4. Error Budgets

The error budget is the SLO’s complement: the amount of failure you can afford. For a 99.5 percent SLO over 28 days, the budget is 0.5 percent of events.

1
2
3
Budget = 1 - SLO target
If 200,000 imports are expected in the window and the SLO is 99.5%,
the budget is 1,000 failed imports (illustrative numbers).

The error budget reframes a perennial argument. Instead of “reliability versus features,” the question becomes: how much of our budget have we used, and what does that tell us to do?

  • Plenty of budget left: ship faster, take risks, run experiments. Unused budget means you may be too cautious.
  • Budget running out: slow down, prioritize reliability work, reduce risky changes.
  • Budget exhausted: pause nonessential releases, and focus the team on stability until it recovers.

Track burn rate: how fast the budget is being consumed compared to the steady rate that would use it exactly at the end of the window. A burn rate of 1 means you will use the budget exactly by the end; 10 means you will exhaust it in a tenth of the window. Burn rate is the basis for good alerts (lesson 5): a fast burn needs immediate attention; a slow burn needs a ticket.

5. The Error Budget Policy

A budget without consequences is a chart. Write a short policy, agreed by engineering and product, that says what happens at each level. For example (illustrative):

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Error budget policy: SignalDesk API and imports

- Budget above 50%: normal release cadence.
- Budget between 10% and 50%: releases require a risk note;
  reliability items from the improvement backlog get priority in
  planning.
- Budget below 10%, or a burn rate above 10 for one hour:
  incident process starts; non-critical releases pause.
- Budget exhausted: feature releases stop until the service is
  back within its SLO or the product owner and tech lead document
  an exception; the team works on the reliability backlog.
- One-off events beyond our control (a provider outage, a
  cloud-region failure) are recorded and reviewed, and may be
  excluded from the budget only by joint decision.
- Review: policy and SLOs are reviewed quarterly.

The policy works only if product and engineering both sign it and if leadership supports it when it bites. Review the SLOs themselves too: if the budget is never used, the target may be too loose; if it is always exhausted, the target is unrealistic or the service needs investment.

6. Toil and the Principles of SRE

Toil is work that is manual, repetitive, automatable, tactical, and that grows linearly with the service. Restarting a stuck worker by hand, resizing storage every month, and copying data between systems for a customer are all toil. It has no lasting value, and it crowds out improvement.

  • Measure it: use the interruption log from lesson 1.
  • Cap it: a common guideline is that no more than about half of an engineer’s time should go to operational work, leaving the rest for engineering that reduces future toil.
  • Eliminate it: automate, fix the root cause, or remove the feature. Prefer eliminating the need over automating the task.

Other principles that run through this course:

  • Embrace risk deliberately. Aim for the right reliability, not maximum.
  • Automate the repeatable; keep humans for judgment.
  • Monitor what users experience, and alert on symptoms rather than causes.
  • Keep changes small and reversible (the delivery course).
  • Prepare for failure: runbooks, rehearsal, and graceful degradation.
  • Learn without blame: failures reveal system weaknesses, not personal ones.
  • Simplicity: complexity is a source of outages; remove what you do not need.

7. Designing for Graceful Degradation

Reliability targets are met not only by preventing failure but by making failure smaller. Decide in advance what the service does when a part fails:

Failure Degraded behavior that protects the core
Model provider slow or down Imports and browsing continue; summaries show “being prepared” and are retried; a feature flag can switch summaries off
Queue backlog Show import status honestly; prioritize small jobs; apply limits per tenant
Database read replica lag Serve slightly stale data for non-critical views
One tenant’s heavy usage Rate limit that tenant so others are unaffected
Partial outage in a dependency Circuit breaker stops repeated failing calls and frees resources

Tie each degraded mode to an SLO: for example, the import SLO does not depend on the summary being generated. Separating those prevents one dependency from consuming the whole budget.

8. Using AI for SLIs and SLOs

AI can draft candidates and challenge them. It cannot know what your users value or what your data shows.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Act as an experienced site reliability engineer helping to define
service level objectives.

Inputs:
- Critical user journeys and what users expect of each: [paste]
- Architecture and dependencies, including external providers and
  their stated reliability: [paste]
- Current telemetry available and any historical data: [paste]
- Business context: customers, contracts, cost of downtime: [paste]

Tasks:
1. For each journey, propose one to three SLIs expressed as good
   events over valid events, with a precise specification and where
   it would be measured.
2. Identify journeys where the data needed to compute the SLI does
   not exist yet.
3. Propose initial SLO targets and windows with reasoning, and mark
   which are guesses that need data.
4. Compute the error budget for each in events or minutes, using the
   volumes provided; show the calculation.
5. Identify dependencies that limit the achievable target and
   propose graceful degradation.
6. Draft an error budget policy for review.
7. List the questions that should be answered by users and
   stakeholders.

Do not invent historical data. State every assumption.

Verify the output. Recompute the budgets by hand. Check that each SLI can really be measured from your telemetry. Ask stakeholders, not the model, which targets match their expectations. Beware of the model proposing impressive but unjustified nines.

9. Practical Exercise

For SignalDesk (or your project):

  1. List the critical user journeys and, for each, what “working” means to the user.
  2. Define three to five SLIs with precise specifications and implementation notes; mark those that cannot be measured yet.
  3. Set initial SLOs and windows with reasons, and compute the error budget for each.
  4. Write the error budget policy and get agreement from the product owner and tech lead.
  5. List sources of toil from your interruption log, and choose one to eliminate.
  6. Define graceful degradation behaviors for the database, queue, and model provider, and link each to an SLO.
  7. Run the AI SLO prompt, compare, and resolve differences with data and stakeholders.
  8. Store the SLO document in the operations workspace with an owner and a review date.

Verification

You are ready to continue when:

  • Each SLI is a ratio of good to valid events with a precise specification.
  • Each SLO has a target, a window, and a reason, and the error budget has been computed.
  • The error budget policy states what changes at each level and is agreed by product and engineering.
  • SLIs that cannot yet be measured are listed as instrumentation work for the next lesson.
  • Degraded modes are defined, so a dependency failure does not automatically become an SLO breach.

Key Takeaways

  • Reliability should be defined from the user’s experience, using SLIs, SLOs, and error budgets.
  • The right target is a decision about value and cost, not the highest number.
  • Error budgets turn the reliability-versus-features argument into a data-driven policy.
  • Reduce toil and design for graceful degradation to meet targets sustainably.
  • AI drafts and challenges objectives; people set them with users and stakeholders.

What’s Next?

With objectives defined, we need the ability to see what the system is doing. The next lesson covers observability: designing a system that lets you ask new questions about it without deploying new code.