The idea in one minute#
Site reliability engineering is what happens when you ask software engineers to run production. Instead of growing an operations team in proportion to the number of servers, you treat running the service as a software problem: measure reliability as a number, agree how much unreliability is acceptable, automate the repetitive work, and spend the rest of the time making the system fail less and recover faster.
The term comes from Google, where Ben Treynor Sloss started the first SRE team in 2003. His one-line definition is still the best: SRE is what happens when you ask a software engineer to design an operations function.
An analogy#
A hospital does not measure success by “no patient ever gets sick”. It measures recovery times, infection rates and how fast the emergency room triages. It runs drills, writes checklists after every serious mistake, and does not fire the nurse who reported one. SRE brings the same habits to software: targets, triage, drills, checklists, and a culture that makes reporting failure safe.
A picture#
flowchart TB
subgraph DEV["Product engineering"]
F[":i-code: <b>Features</b><br/><small>wants to ship fast</small>"]
end
subgraph SRE["Site reliability engineering"]
SLO[":i-gauge: <b>SLOs</b><br/><small>how reliable is enough</small>"]
EB[":i-coins: <b>Error budget</b><br/><small>1 − SLO</small>"]
AUTO[":i-wrench: <b>Automation</b><br/><small>removes toil</small>"]
OC[":pagerduty: <b>On-call</b><br/><small>incident response</small>"]
end
F -->|"releases spend budget"| EB
SLO --> EB
EB -->|"budget left: ship"| F
EB -->|"budget gone: fix reliability"| AUTO
OC -->|"postmortems"| AUTO
class F compute
class SLO,EB memory
class AUTO io
class OC warnThe error budget is the trick that makes it work. Developers want to ship; operators want stability. Instead of arguing, both agree on a number. While the service is inside its budget, the team ships. When the budget is spent, reliability work comes first. No one has to win an argument.
How it really works#
What an SRE does all week#
| Activity | Example | Share of time (typical) |
|---|---|---|
| Engineering for reliability | Add load shedding, remove a single point of failure, automate a failover | 50% or more |
| On-call and incident response | Answer a page, run an incident, mitigate | 10–25% |
| Toil | Manually rotate a certificate, resize a disk, approve a quota | capped at 50%, aimed lower |
| Reviews and consulting | Production readiness review of a new service, design review | 10–20% |
| Postmortems and follow-up | Write the review, fix the action items | 5–10% |
The 50% cap on operational work is the most important rule in SRE as Google described it: if toil and tickets take more than half of the team’s time, the excess goes back to the development team (or the pager does) until the engineering work catches up. It keeps SRE from turning back into an operations team.
The core principles#
These come from the Google SRE book and are still the backbone of every SRE organisation:
- Embrace risk. 100% reliability is the wrong target (1.d).
- Service level objectives. Reliability is defined by SLIs and SLOs that reflect users (Module 2).
- Eliminate toil. Repetitive manual work is automated, measured and capped (1.c).
- Monitoring. Alert on symptoms users feel, not on every cause (Module 3).
- Automation. Prefer systems that fix themselves over runbooks a person executes.
- Release engineering. Releases are reproducible, gradual and reversible (Module 8).
- Simplicity. Every line of code and every component is a liability; boring is a virtue.
SRE, operations, DevOps and platform engineering#
These words overlap and are used loosely. A precise version:
| What it is | Primary output | |
|---|---|---|
| Traditional operations | A team that runs software someone else wrote | Tickets closed, uptime |
| DevOps | A culture and set of practices: developers and operators share responsibility, automate the pipeline, measure flow | Faster, safer delivery |
| SRE | A specific implementation of DevOps with explicit rules: SLOs, error budgets, toil caps, blameless postmortems | Reliability measured against an agreed target |
| Platform engineering | A team that builds an internal product (paved roads, golden paths, self-service infrastructure) for other engineers | An internal platform with users |
Google’s own phrasing is “class SRE implements interface DevOps”. Many companies have an SRE team that also builds the platform; that is fine as long as the SLO and toil disciplines survive.
What SRE is not#
- Not a rename of the ops team. If the team is not allowed to push back on unreliable releases and spends 90% of its time on tickets, it is an ops team with a new title.
- Not the people who fix everything at 3 a.m. Developers stay responsible for their service; SRE makes the response fast and the failures rarer.
- Not “no outages”. It is “the right number of outages, recovered from quickly, never the same one twice.”
A worked example#
A small company runs a checkout API. Every Friday someone deploys, something breaks, and two engineers spend the weekend fixing it. The product team says the ops team is slow; the ops team says the product team ships broken code.
The SRE way, in order:
- Agree an SLO. “99.9% of checkout requests succeed in under 800 ms, over 28 days.” That allows about 40 minutes of total failure a month (1.b).
- Measure it. Last month: 99.71%. They were three times over budget, and now that is a fact, not an opinion.
- Write the policy. While the budget is exhausted, only fixes and reliability work ship. (2.c)
- Find the causes. Postmortems of the last four incidents show three were bad deploys with no canary and one was a database connection pool exhausted by retries.
- Engineer. Add a 5% canary stage with automatic rollback (8.b) and retry budgets (6.b).
- Result. Next month: 99.94%. The team is inside its budget and allowed to ship on Fridays again.
No one was blamed and nobody won an argument. A number changed what was done.
Code#
A first taste of the arithmetic: how much failure an SLO allows over common windows. Every later module builds on this table.
// allowance.go — how much downtime each SLO allows over common windows.
package main
import (
"fmt"
"time"
)
func main() {
slos := []float64{0.99, 0.995, 0.999, 0.9995, 0.9999, 0.99999}
windows := []struct {
name string
d time.Duration
}{
{"day", 24 * time.Hour},
{"week", 7 * 24 * time.Hour},
{"28 days", 28 * 24 * time.Hour},
{"quarter", 91 * 24 * time.Hour},
{"year", 365 * 24 * time.Hour},
}
fmt.Printf("%-9s", "SLO")
for _, w := range windows {
fmt.Printf("%14s", w.name)
}
fmt.Println()
for _, s := range slos {
fmt.Printf("%-9s", fmt.Sprintf("%.3f%%", s*100))
for _, w := range windows {
allowed := time.Duration(float64(w.d) * (1 - s)).Round(time.Second)
fmt.Printf("%14s", allowed)
}
fmt.Println()
}
}Run it with go run allowance.go. Notice that 99.99% leaves about four minutes a month — less
time than it takes most people to wake up, open a laptop and log in. A target that tight is a
statement that a human will never be fast enough, and every recovery must be automatic.
Remember this#
- SRE is software engineers running production with explicit rules: SLOs, error budgets, toil caps, blameless postmortems.
- The error budget replaces the “ship versus stability” argument with a number.
- Operational work is capped at about half of an SRE’s time; the rest is engineering.
- DevOps is the culture; SRE is one concrete way to practise it; platform engineering builds the internal product engineers use.
Try it#
- Run
allowance.go. Find the SLO whose monthly allowance is closest to one hour. - Write down how your team (or one you know) spends a typical week. What fraction is toil?
- Pick a service you use daily. What would you say is its SLO, in one sentence? What would make a request “bad”?
Check yourself#
- In one sentence, what problem does the error budget solve?
- What happens, in the Google model, when operational work exceeds 50% of the team’s time?
- Give one difference between SRE and platform engineering.
- Why is “no outages ever” not an SRE goal?
Sources#
- Google: Site Reliability Engineering (the SRE book), free online — chapters 1 (Introduction) and 5 (Eliminating Toil)
- Google: The Site Reliability Workbook — chapter 1, “How SRE Relates to DevOps”
- Google Cloud: SRE vs. DevOps — competing standards or close friends? — “class SRE implements interface DevOps”