LOOP · The DevOps Codex
Ch 14 · SRE & Reliability
Chapter 14 · The Reliability Discipline

SRE & Reliability — engineering reliability as a feature

Site Reliability Engineering was born at Google in 2003 when Ben Treynor was asked to build "what happens when you let a software engineer design an operations team." Two books, twenty years, and the entire industry's hiring titles later, SRE is the discipline that quantifies reliability, budgets failure, and refuses to chase a 100% target.

14.1 · What SRE is

Definition. Site Reliability Engineering (SRE) is the discipline of treating operations as a software problem: using engineering work to drive reliability, and capping the time spent on unscaleable "toil" so engineers can keep building.

  • Origin. Ben Treynor Sloss, Google, 2003. Codified in the Google SRE Book (2016) and the SRE Workbook (2018), both free at sre.google.
  • Three Pillars (Workbook ch.1): Service Level Objectives, Toil management, and Engineering work (build & improve).
  • Core stance. 100% reliability is the wrong target; pursuing it costs more than your users value the next nine.

14.2 · SRE vs DevOps

DevOpsSRE
What it isA culture/philosophy classA class-1 implementation of that philosophy
Question answered"How do we collaborate?""How do we engineer reliability quantitatively?"
Primary toolCI/CD + shared ownershipSLOs + error budgets + toil cap
Org patternYou-build-it-you-run-it teamsEmbedded SRE / consulting SRE / platform SRE
Liz Fong-Jones: "SRE implements DevOps." They are not competitors; SRE is a concrete answer.

14.3 · SLI · SLO · SLA · error budget

TermDefinitionExample
SLI — Service Level IndicatorA measurable property of the service."fraction of HTTP requests returning 2xx/3xx in < 400 ms"
SLO — Service Level ObjectiveTarget for an SLI over a window."99.9% of such requests over 28 days"
Error budget1 − SLO; the permitted unreliability.0.1% of 28 days ≈ 40 m 19 s
Bad SLOWhy badBetter
"100% uptime"Costs ∞; one network blip burns trust."99.9% successful requests / 28d"

14.4 · Choosing SLIs — the menu

The SRE Workbook lists seven canonical SLI types. Map each to a user journey, not to a server.

SLI typeQuestionExample service
AvailabilityDid it answer?API endpoints, web pages
LatencyWas it fast enough?Search, checkout
QualityWas it degraded?Recommendations, ML ranking
FreshnessHow stale is the data?Dashboards, replicas, news feed
CorrectnessDid it give the right answer?Billing, ledgers

14.5 · SLO format & tools

ToolOpen?Strength
Sloth / OpenSLOOSSYAML → Prometheus rules; vendor-neutral SLO spec.
Datadog / Grafana SLO / Nobl9SaaSBurn-rate alerts built-in; OpenSLO output; multi-source platform (Nobl9 created the spec).
# OpenSLO v1 — minimal example
apiVersion: openslo/v1
kind: SLO
metadata: { name: checkout-availability }
spec:
  service: checkout
  indicator: { metricSource: { type: Prometheus }, ratioMetric: { good: { promql: 'sum(rate(http_requests_total{job="checkout",code=~"2..|3.."}[1m]))' }, total: { promql: 'sum(rate(http_requests_total{job="checkout"}[1m]))' } } }
  objectives: [ { displayName: "99.9% / 28d", target: 0.999 } ]
  timeWindow: [ { duration: 28d, isRolling: true } ]

14.6 · Multi-window, multi-burn-rate alerting

Definition. A burn rate is the speed at which you are consuming the error budget relative to the SLO window. A burn rate of 1 exhausts the budget exactly at the end of the window; a burn rate of 14.4 over 1 hour burns 2% of a 28-day budget.

The SRE Workbook recommends pairing a fast window (catch big fires) with a slow window (catch slow leaks), both required to fire.

AlertShort windowLong windowBurn rateSeverity
Fast burn5 min1 h14.4×Page
Medium burn30 min6 h6×Page
Slow burn2 h3 d1×Ticket
budget %time → SLO target = 99.9% fast-burn alert budget exhausted

14.7 · Error-budget policy

An SLO without consequences is a wish. The error-budget policy is the agreement that says what happens when the budget burns through.

  • Budget healthy — ship features; tolerate experimental risk.
  • Budget warning (50% gone, ⅓ of window left) — review reliability work; gate risky launches.
  • Budget exhausted — feature-deploy freeze; the only changes allowed are reliability fixes, rollbacks, and security patches. Lifts when the next window starts or budget recovers.
  • Signed by product owner + engineering lead + SRE lead. Without exec buy-in, the freeze never holds.

14.8 · Toil & the toil budget

Definition (Google SRE). Toil is operational work that is: manual, repetitive, automatable, tactical, devoid of enduring value, and scales linearly with service growth.

ToilNot toil
Restarting a stuck queue every Tuesday.Designing the system that auto-recovers it.
Filing the same JIRA ticket per onboarding.Building the self-service portal.
Manually rotating certificates.Cert-Manager + ACME.
Toil cap. Google SRE targets ≤ 50% of any SRE's time on toil; the rest is engineering. If the toil cap is exceeded for a quarter, work is bounced back to the dev team until automated.

14.9 · Capacity planning & sizing

  • Demand forecast — historical traffic × seasonality × growth × launch impact.
  • Headroom — never plan to peak utilisation; SREs commonly target ≤ 60–70% steady-state to absorb traffic spikes & failure of one zone.
  • Autoscaling — HPA on K8s, target-tracking on AWS ASG/ECS, Cloud Run min-instances for cold-start tolerance.
  • Little's Law — L = λ × W: average concurrency = arrival rate × time in system. Knowing two gives you the third; useful for sizing thread pools, queue depth, connection pools.

14.10 · Chaos engineering

Definition. Chaos engineering is the discipline of injecting controlled failure to surface weaknesses before customers do. Codified in Principles of Chaos (principlesofchaos.org, Netflix 2015): hypothesis, blast radius, abort conditions, run in production with informed consent.

ToolOriginScope
Chaos Mesh (CNCF, incubating)PingCAP, 2019K8s-native: pod, network, IO, time, kernel.
LitmusChaos (CNCF, incubating)Harness, 2018K8s; ChaosHub experiment catalogue.
GremlinEx-Netflix Chaos Monkey teamSaaS; agents on host/cloud/K8s.
AWS Fault Injection Service (FIS)AWS, 2021Native AWS faults (EC2, RDS, EKS, ECS).
Azure Chaos StudioAzure, 2023 GANative Azure faults.
SteadybitCommercialMulti-platform experiment IDE.
  1. Hypothesis. "If we lose AZ-b, checkout p99 stays under 600 ms."
  2. Blast radius. Smallest possible — one pod, one instance, one canary cell.
  3. Abort criteria. Pre-defined thresholds; one-click rollback.
  4. Game Day. Scheduled, attended exercise; everyone on a video call; learnings written up.

14.11 · Postmortems

Definition. A blameless postmortem is a written analysis of an incident focused on systemic causes and durable action items, never on individual blame.

  • Timeline — UTC timestamps from detection through resolution.
  • Impact — user-visible, in plain terms (count, duration, region, segments).
  • Root causes — 5-whys, plural causes acceptable. Tooling helped, but the change that broke prod & the gap that let it through both count.
  • Action items — owner + due date + JIRA link. No "we should consider…" without an owner.
  • What went well — preserve good practice; it gets cargo-culted faster than the fix.
Postmortem toolingNotes
incident.ioSlack-native incident + retro flow.
FireHydrant, RootlyFull lifecycle + postmortem templates.
Jeli (acquired by PagerDuty 2023)Narrative-driven, "learning from incidents" school.

14.12 · Reliability culture

  • Quarterly error-budget reviews + SLO retros with product + eng leadership; check that SLOs still measure what users actually care about.
  • Public exec dashboards for top user journeys; reliability becomes a board-level concern.
Avoid the 100% trap. If users perceive 99.95% as perfect, building 99.999% is engineering waste — and the deploy freeze it requires will starve product velocity.

14.13 · Self-check

Q1 · Which of the following is a correct definition of an error budget?
A reserve of cloud credits for postmortems.
1 − SLO; the permitted unreliability within the SLO window.
SLA refund pool committed to customers.
A budget for replacing failed disks.
Q2 · By Google's definition, which characteristic is required for work to be "toil"?
It is performed by a contractor.
It happens outside business hours.
It scales linearly with service growth.
It requires root access.
Q3 · Why pair a 5-minute window with a 1-hour window in a multi-burn-rate alert?
To reduce on-call rotation length.
Short window catches fast burns; long window filters out brief spikes that self-heal.
To satisfy SOC 2 logging requirements.
To halve cloud monitoring spend.