Skip to content

Advanced Concepts · Concept lesson

Reliability: SLOs, Failure Containment, and Recovery

Turn user-facing reliability expectations into measurable objectives, graceful degradation, and tested recovery rather than an uptime slogan.

Written for readers who already know the basics. If the words here are new to you, read The request lifecycle and Capacity estimation first.

Original educational architecture · Version 2026-11-12.1 · Examples use stated hypothetical assumptions, not a company's actual design.

What you will be able to explain

  • Define user-centered SLIs with explicit good-event denominators.
  • Use error budgets to guide release risk and reliability investment.
  • Design timeout, retry, isolation, and restore practices around failure domains.

Reliability is a promise about a user journey

Reliability is not a property of a server's green dashboard; it is whether a user can complete an intended task under stated conditions. Start with a journey such as submitting a payment, loading a lesson, or receiving an alert. Define which attempts are eligible, what counts as good, what latency threshold matters, and how the observation window works. A request success rate may ignore a page that returns HTTP 200 but contains no useful data. A dependency uptime metric may not reflect a degraded but usable workflow. Conversely, counting every internal retry as a user failure can overstate impact. A good service-level indicator is simple enough that responders can explain it, yet precise enough to resist denominator changes during an incident.

An SLO is a target, not a guarantee that every request succeeds. If the SLI is 99.9% successful eligible requests over 30 days, then the error budget is 0.1% of that denominator. At 1,000,000 eligible requests, the nominal budget is 1,000 failed or over-threshold events. This arithmetic says nothing about severity distribution: a minute-long total outage could use a large portion of budget quickly. Nor does it mean the service must fail exactly 0.1% of the time. The target helps teams make an explicit reliability tradeoff. An SLA is a contractual promise with remedies and often a different measurement. Keep internal goals and customer commitments distinct.

Build objectives from denominators, windows, and latency tails

For an availability SLI, define a good event, an eligible event, and exclusions. Example: a successful page response with required content rendered within 1.5 seconds divided by all non-test page attempts from supported clients. Excluding server errors but counting them nowhere makes the number dishonest; exclude only documented traffic such as synthetic probes or invalid requests. Low-volume services need longer windows, weighted aggregation, or explicit handling of small samples. A numerator and denominator should be visible in a dashboard and version-controlled with the objective. If the user journey spans multiple services, measure at the edge where user value is observable and retain component metrics for diagnosis.

Latency is a distribution, not an average. If 99 requests take 100 ms and one takes 10 seconds, mean latency is 199 ms but one user experienced a long stall. Tail percentiles such as p95 or p99 reveal this, but percentile aggregation across small windows can be misleading; histogram buckets or event-level ratios can provide more robust SLO calculations. A latency SLI may count the fraction of eligible requests below a threshold rather than averaging percentiles. Pair latency with correctness: a fast response containing stale or incomplete data may not be good. For streaming or async work, define the event from request acceptance to durable completion, not just queue admission. Segment by important journey or client class without creating dozens of objectives no one can act on.

Calculate budget burn and response priority

Take a 30-day objective of 99.9% good events. The budget fraction is 0.001. For 2 million eligible events, the budget is 2,000 bad events. If a five-minute incident creates 50,000 eligible requests at a 20% failure rate, it consumes 10,000 bad events—five times the monthly budget—so a short event can exhaust the objective. A burn rate compares the observed error fraction over a window with the allowed fraction. If errors run at 1% against a 0.1% budget rate, that is 10× burn. Alerting over both a short window and a longer window can catch severe fast incidents and sustained slower degradation without paging on every isolated blip.

Recovery planning should quantify impact rather than merely state 'multi-AZ.' Suppose a database backup restore takes 90 minutes and point-in-time recovery loses at most 5 minutes of acknowledged data under its tested setup; that is an observed RTO of 90 minutes and RPO of 5 minutes for that drill, not necessarily every failure. If product commitments require 30-minute recovery, the current architecture misses by an hour. A replica might improve failover time but can replicate corruption or accidental deletion immediately. Restore tests need to prove integrity and application usability, not just that infrastructure reports success. Record actual detection, decision, recovery, validation, and user-restoration times.

Reliability loop from user outcome through objective to tested recovery
1. User journey

Defines the behavior and consequence that matter.

2. SLI numerator / denominator

Counts eligible good events and tail latency.

3. SLO + error budget

Sets an explicit objective and release decision context.

4. Alert and response

Burn-rate alert guides human action.

5. Recovery drill

Tests failover, backup restore, RPO, and RTO.

6. System changes

Addresses measured failure modes and updates assumptions.

  1. User journey → SLI numerator / denominator: observable outcome
  2. SLI numerator / denominator → SLO + error budget: measured over window
  3. SLO + error budget → Alert and response: budget burn
  4. Alert and response → Recovery drill: incident / exercise
  5. Recovery drill → System changes: record evidence
  6. System changes → User journey: revalidate user impact

Use failure patterns that protect critical work

Timeouts bound how long one request can consume resources. Retries recover transient failures but multiply load; use bounded attempts, jitter, and an overall deadline. A circuit breaker can stop sending calls to a failing dependency, while a bulkhead limits how many requests or threads that dependency can consume. These patterns trade immediate completeness for survival of other work. A cache or stale read can preserve a useful response when an origin is unavailable, but only if stale data is safe for the operation. For a profile page that may be acceptable; for an account balance or authorization decision it may not be. Graceful degradation should be designed and communicated rather than improvised under pressure.

Replication can improve availability and read throughput, but it introduces consistency and failover decisions. A replica may be stale; synchronous replication may increase write latency or reduce availability during network partitions. A standby that is never exercised may fail to promote because of an overlooked credential or capacity limit. Multi-zone placement helps only for failures within the designed fault domain and does not replace backups or restore tests. Chaos experiments can expose hidden assumptions, but they should be scoped, observable, and reversible. A staged failure drill with explicit stop conditions is better than indiscriminate production disruption.

Detect cascading failure and test recovery end to end

A common cascade begins with a slow dependency. Requests hold connections longer, queues rise, clients retry, and worker pools saturate; the original small outage becomes system-wide. Deadlines should propagate across service calls so downstream work cannot outlive the caller's useful budget. Retries should not occur at every layer without a shared retry budget. Shed low-priority work, preserve capacity for health and recovery operations, and prevent overloaded instances from accepting more work than they can serve. Monitor queue age, concurrency, connection-pool wait, timeout rate, and saturation alongside request errors. A service can report nominal availability while all useful completions are delayed beyond the user's patience.

Recovery requires evidence. Backups must be isolated from ordinary destructive credentials, restore procedures documented, and restoration tested on a schedule. Verify data checksums, referential integrity, authorization behavior, and application-level reads after restore. State RPO as the maximum acceptable loss of acknowledged data and RTO as the maximum time until the service is usable, then record actual drill results. A failover can produce split-brain writes if old and new primaries both accept traffic; fencing and clear authority are required. Post-incident actions should target systemic causes and be prioritized by risk, not merely add more alerts. Recovery drills need owner, scope, user impact guardrails, and a recorded correction loop.

When high availability is not the first investment

Do not add another replica or region before understanding what users need and what actually fails. A low-criticality internal tool may rationally accept a longer outage while prioritizing simpler restores and lower operational burden. A rarely used replica can add stale-data risk, failover confusion, and cost without reducing the dominant failure mode, such as a bad deployment or a dependency outage. For low-traffic services, a 99.99% objective may be statistically noisy and expensive to measure; choose a window and method that support a real decision. Reliability targets should reflect consequences, not competition among teams.

Do not make error budgets a punitive score or a reason to hide incidents. They are a decision aid: when budget is healthy, teams can take measured product risk; when it is depleted, they should focus on changes that reduce user harm. Some workloads need strict safety controls independent of a statistical budget. A contractual SLA may require legal review and a separate accounting policy. If the team has no capacity to respond to alerts or restore data, purchasing a more complex topology can reduce reliability. Build ownership, runbooks, and operational practice with the architecture.

Senior questions for reliability strategy

Ask which user journey matters, how good and eligible events are defined, and whether the denominator includes every meaningful failure. What latency threshold reflects usefulness, and are tails visible rather than only means? How are async acceptance and eventual completion counted? How much error budget remains, which burn-rate windows trigger action, and who can make the release decision? Does a replica improve the actual failure domain or just add another copy? What are the measured RPO and RTO from the latest restore drill, and what was validated after the restore?

Challenge recovery and overload assumptions. Can the system avoid retry amplification and preserve critical functions when a dependency slows? Are retries bounded end to end? Can failover fence an old writer? Do backups survive deletion of production credentials? Are runbooks exercised by the people who will respond? How do user impact, privacy, accessibility, and regional constraints change the objective? The strongest answer states both the reliability improvement and its cost, then names evidence that would cause the team to revisit the objective or design. An SLO is useful only if it changes action.

Terms in plain language

SLI
A measurement of a user-relevant service behavior, defined by good and eligible events.
SLO
A target for an SLI over a stated time window; it is an internal reliability objective.
Error budget
The allowed fraction of eligible events that may fail while an SLO is met.

Preparing practice controls…

Check your understanding

These checks explain concepts. They do not measure architecture seniority or update readiness.

1. A 99.9% good-event SLO has how much error budget by fraction?
2. Why is a configured backup job not enough evidence of recoverability?

Design independently

Define reliability for a service that accepts and asynchronously processes customer reports. Reports may take up to 2 minutes to finish, and an outage must not silently lose accepted reports. Set SLIs/SLOs, alerting, and recovery targets.

Hints, not a solution
  • Do not equate HTTP acceptance with completed processing.
  • Define eligibility and good-event thresholds explicitly.
  • RPO and RTO need a restore drill, not just a backup configuration.

0 / 20,000 characters · Not saved

Your learning notes

Sign in to save

Marking a lesson read and reviewing an exercise are separate actions. Neither implies mastery. Saved work is account-owned; saves are explicit and do not queue offline.

References and boundaries

Primary documentation supports the mechanisms described. It does not certify these hypothetical architectures, prices or sizing assumptions. Review platform-specific behavior before implementation.

Google SRE Workbook: Implementing SLOs

Primary Google SRE guidance on choosing indicators, objectives, and actionable reliability practices.

Google SRE Workbook: Alerting on SLOs

Primary Google SRE guidance on alerting based on error-budget consumption and burn rates.

Back to curriculum