Unit 7 of 9 · about 4 hours · explain
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.
You'll be able to
- 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
Read
In this order, only the parts listed
0 of 4 done
- Canary process and metric selectionGoogle 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)
- Canary isolation and gradual stagesGoogle 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)
- Reliability test vocabularyGoogle Site Reliability Engineering - selected core chapters
Stress test; Canary test; Production Probes
Read the three test definitions only. Full disaster testing returns in the incidents unit.
- What triggers cascading failureGoogle 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 and . , , holds; , , 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).
Common mistakes · 3
- 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.
Try it yourself
Closed-book, before checking anything
Quiz yourself
Answer first, then mark it. Missed ones go to Review.
0 got · 0 missed
1.db replicas live in a and a; cache has one copy in c. At-risk? Dead after a fails?Answer
At-risk: db and cache (each under two zones). Dead after a fails: db only.
2., , : safe quorums?Answer
No. and equal instead of exceeding it, so disjoint halves can both take writes.
3.Canary errors are flat but p95 is up 10%. Promote?Answer
Not on error rate alone. Latency SLIs indicate user-visible harm; hold or roll back per the metric policy, then check attribution.
4.Readiness passes but answers are wrong. What is missing?Answer
A domain correctness signal: sampled output checks, a freshness watermark or a reconciliation count, alerted like an SLI.
Practice
- AlgoMaster: Audit Failure Domains
atRiskComponents(under two distinct zones) andunavailableAfter(every replica in the failed zone), sorted without duplicatesAttempt 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) andhasSafeQuorums( and )Attempt only after your own quorum arithmetic. A reachable majority is not a safe quorum.
You're done when
You map zones, quorums and canary result without notes and can state which simultaneous pair your design survives.
Only when you can do this without notes.
Leads to
Notes
Resources · 2 for this unit, 5 more in the section
- Google Site Reliability Engineering - selected core chaptersGoogle SRE · primary
Read Chapters 3, 4, 6, 10, 12, 17, 19-22: risk, SLOs, monitoring, alerting, troubleshooting, reliability tests, load balancing, overload and cascading failure. Apply every concept to the same bounded RPC and store rather than inventing separate examples.
- Google SRE Workbook - SLO, load, incident and canary exercisesGoogle SRE · required
Use Chapters 2, 4, 9-11, 12, 14, 16 and 17. Define one SLO, estimate capacity, load through saturation, canary a changed version, roll it back, and write one evidence-based incident timeline.
Also in this section
- OpenTelemetry Python - metrics, logs and tracesOpenTelemetry · required
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 drillsAlgoMaster · support
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 sliceRoadmap-Final · support
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 YouTube · support
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,heyorab; write the small Python generator in the saturation unit instead. - M/M/1 queue - model definition and stationary analysisWikipedia · reference
Read Model definition (Poisson arrivals, exponential service, single server, infinite buffer, FIFO) and Stationary analysis (stability , , , response time via Little's Law). Use the closed forms as approximations with assumptions stated, checked by your own simulation.