7 routes42 sections324 units

Unit 6.7 · about 4 h

280 / 324

Failure domains, correctness signals and safe rollout

Container readiness, liveness and SIGTERM drains from the Programming health-containers-runbooks unit, taken as assumed background, tell you a process runs. This unit asks whether it serves correctly, and whether one rollout or one zone loss takes everything with it.

  • explain

You can now

  • Map replicas to failure domains and name the single points the replica count hides.
  • Walk two simultaneous failures and state preserved and violated invariants.
  • Run a canary with population, duration, representative metrics and rollback rule, and read its result.
  • Separate health and readiness from domain-specific correctness signals.

Covers

  • Failure domains and simultaneous-failure reasoning
  • Health, readiness and domain-specific correctness signals
  • Canary, rollback, version and migration tests

Study, in this order

4 steps

  1. Canary process and metric selection
    Google SRE Workbook - SLO, load, incident and canary exercises

    Requirements of a Canary Process; Choosing a Canary Population and Duration; Selecting and Evaluating Metrics (Metrics Should Indicate Problems; Metrics Should Be Representative and Attributable; Before/After Evaluation Is Risky); Requirements on Monitoring Data (split canary from control; metric intervals within canary duration)

  2. Canary isolation and gradual stages
    Google SRE Workbook - SLO, load, incident and canary exercises

    Dependencies and Isolation (shared backends couple canary and control; check absolute SLOs); Use a Gradual Canary for Better Metric Selection; Related Concepts (Blue/Green Deployment)

  3. Reliability test vocabulary
    Google Site Reliability Engineering - selected core chapters

    Stress test; Canary test; Production Probes

    Depth · Read the three test definitions only. Full disaster testing returns in the incidents unit.

  4. What triggers cascading failure
    Google Site Reliability Engineering - selected core chapters

    Triggering Conditions for Cascading Failures (Process Death; Process Updates; New Rollouts; Organic Growth); Testing for Cascading Failures (Test Until Failure and Beyond)

Focus on

  • Replicas in one zone are one failure. API across two zones survives; a database with both copies in us-east-1a does not. Count zones per component, not replicas.
  • Safe quorums need \(R + W > N\) and \(2 \times W > N\). \(N=5\), \(R=3\), \(W=3\) holds; \(N=4\), \(R=2\), \(W=2\) lets two disjoint halves both take writes.
  • Canary metrics must indicate user-visible problems and attribute to the change: reuse SLIs, prefer crash and failure signals in the small first stage, split canary from control in monitoring, and distrust before/after comparisons across time.
  • Health says the process answers; correctness signals say the answers are right. A serving-but-wrong version passes readiness and needs a domain check (output quality, freshness watermark, reconciliation count).

Reproduce closed-book

Closed-book, map components api (zones a, b), db (a, a) and cache (c): at-risk components are db and cache (under two zones), and the dead set after zone a fails is db. Then take a five-replica store with \(N=5\), \(R=3\), \(W=3\) spread 2, 2 and 1 over zones a, b and c: walk zone-a loss plus a bad canary on 5% of traffic, and state what still serves reads and writes and what the canary metrics must show before rollback.

Traps

  • Counting two replicas as redundancy. Same zone, same deploy, same config or same dependency is one domain.
  • Promoting a canary on aggregate error rate. A 5% canary at 20% errors reads as 1% overall; split canary versus control first.
  • Splitting blame evenly between canary and control. Shared backends couple them, so also check absolute SLOs, not just the A/B gap.

Practice

AlgoMaster: Audit Failure Domains

atRiskComponents (under two distinct zones) and unavailableAfter (every replica in the failed zone), sorted without duplicates

Attempt only after your own zone map. Two replicas in one zone still share that zone.

AlgoMaster: Simulate Partition Quorums

partitionStatus (READ_WRITE, READ_ONLY, WRITE_ONLY, UNAVAILABLE) and hasSafeQuorums (\(R + W > N\) and \(2W > N\))

Attempt only after your own quorum arithmetic. A reachable majority is not a safe quorum.

Self-test

  1. db replicas live in a and a; cache has one copy in c. At-risk? Dead after a fails?

  2. \(N=4\), \(R=2\), \(W=2\): safe quorums?

  3. Canary errors are flat but p95 is up 10%. Promote?

  4. Readiness passes but answers are wrong. What is missing?

Completion criterion

Stop when

You map zones, quorums and canary result without notes and can state which simultaneous pair your design survives.

Mark passed, then open 6.8 Only mark this when you can do it without notes.

Leads to

Comes after

Resources for this unit

Also in this section

  • OpenTelemetry Python - metrics, logs and traces
    OpenTelemetryrequiredreference
    Instrument request ID, queue wait, handler time, storage time, status and bounded labels. Export locally, retain raw load records and verify that instrumentation does not hide the bottleneck or create unbounded cardinality.
  • AlgoMaster System Design - quantitative and failure drills
    AlgoMastersupportpractice
    Use Solve Little's Law, Calculate System Availability, Plan Reliability Recovery Targets, Calculate Amdahl's Law Speedup, Analyze Capacity Bottlenecks, Simulate Partition Quorums and Audit Failure Domains only after producing your own estimates. Compare the platform answer with measured service behavior.
  • Python Experimental Systems Kit - measurement slice
    Roadmap-Finalsupportproject
    Use its artifact, bounded-pipeline, failure-injection, profiling and reproducibility requirements as the evidence checklist. Reuse the current service instead of building the full project again.
  • Gil Tene - How NOT to Measure Latency (talk)
    Strange Loop Conference via YouTubesupportreference
    Use for coordinated-omission vocabulary only: closed-loop testers that wait for each reply, the missing samples under queueing, and the correction concept of recording intended send time. Do not adopt wrk, hey or ab; write the small Python generator in the saturation unit instead.
  • M/M/1 queue - model definition and stationary analysis
    Wikipediareferencereference
    Read Model definition (Poisson arrivals, exponential service, single server, infinite buffer, FIFO) and Stationary analysis (stability \(\lambda < \mu\), \(\rho = \lambda/\mu\), \(L = \rho/(1 - \rho)\), response time \(1/(\mu - \lambda)\) via Little's Law). Use the closed forms as approximations with assumptions stated, checked by your own simulation.

Quick find

Search Michi

Type to search every route, section, unit, topic and resource.

Enter opens the first result Esc closes

Reference

Keyboard shortcuts

n
Continue to the first unit not passed
j / k
Next / previous unit
1 2 3
Toggle learned, practised, passed
/
Open search
?
Show this help
Esc
Close open panels