Failure models and dependency graphs
Model required dependencies, shared failure domains, and correlated outages before interpreting a replica count as resilience.
On this page
The question for today
What you’ll understand
- Translate a user operation into required and optional dependency paths.
- Calculate independent and common-cause availability scenarios without confusing them.
- Identify a minimal failure set and propose an experiment that challenges it.
A diagram with three replicas can hide a system with one point of failure. All three might share a credential issuer, deployment controller, power domain, or corrupted dataset. Reliability reasoning starts with the operation the user needs to complete and the kinds of failure the design promises to tolerate. We will build a small dependency model, test its independence assumptions, and distinguish losing capacity from returning an incorrect answer. The numerical examples are fictional planning models, not measured cloud failure rates.
Describe the operation before the machines
For a document lookup, draw the frontend, authorization decision, metadata store, object store, and any transformation needed before the response can be useful. Mark which edges must succeed during this particular operation. A cached public thumbnail may avoid the transformation service, whereas downloading a private original cannot avoid authorization. The resulting graph describes conditional execution paths rather than a list of every service owned by the organization. Annotate request volume and resource cost on those paths.
Define a failure model explicitly: process crash, delayed response, network partition, stale read, corrupted data, or arbitrary behavior. A design that survives one process crash may still accept conflicting writes during a partition. Availability also depends on the measurement boundary: a successful internal RPC is not proof that the user received a correct document. Record the observation point, time interval, expected workload, and correctness conditions before attaching probabilities to nodes. Otherwise two teams can report excellent availability while measuring different outcomes.
Separate redundancy from common causes
Two independent alternatives can reduce the probability of losing the operation, but duplication alone does not create independence. Model a shared failure event first, then condition the remaining model on its absence. Examples include a shared encryption-key service, an invalid global configuration, and an operator action applied to both copies. Classifying racks or regions as distinct is evidence about some failure causes; it does not eliminate shared software defects, permissions, or dependencies. A dependency graph should therefore include both physical domains and operational control paths.
A minimal cut set is a set of failures sufficient to make the modeled operation unavailable for which no proper subset is sufficient; it need not have the smallest possible cardinality. Enumerating small cut sets often exposes a surprising singleton, such as a configuration download needed during every restart. Prioritize removing that singleton or giving the operation a tested local capability. Do not assume failure events are mutually exclusive when adding probabilities. The union bound gives a conservative upper bound without independence, while measured joint incidents can support a better model if the sample and uncertainty are adequate.
Challenge the graph with evidence
Compare incident traces with the predicted cut sets. Were replicas actually restarted together? Did traffic shift exceed spare capacity? Did restoring credentials require the broken service? Keep uncertainties visible rather than estimating rare-event probabilities from a quiet month. A useful engineering output is a testable claim: one storage process can be removed during a specified workload while successful lookup latency stays within its boundary. That statement is narrower, more useful, and easier to falsify than saying the architecture is highly available.
Use the replica lab to remove nodes and inspect how many remain relative to a majority. Then redraw the imagined placement so one domain removes several nodes together. The controls only show counts, so correlated domains remain part of your written analysis. A majority being up is necessary for some quorum protocols, but this lab does not implement voting, log agreement, fencing, or durable storage. It cannot prove linearizability or determine whether the surviving nodes have the newest data. Connect every resilience claim to its protocol and evidence.
Work it through
The cost of a hidden shared dependency
Two read alternatives each fail with probability 0.01 conditional on the absence of a common outage. A shared credential dependency is unavailable with probability 0.002 and disables both. Assume conditional independence. Calculate total operation unavailability.
Condition on no shared outage: the probability that both alternatives fail is 0.01 × 0.01 = 0.0001.
Weight that branch by its occurrence probability: 0.998 × 0.0001 = 0.0000998.
Add the disjoint shared-outage branch: 0.002 + 0.0000998 = 0.0020998, or 0.20998%.
The modeled availability is 99.79002%. Ignoring the shared dependency would predict 99.99%, an unjustified improvement of roughly twenty-one times in unavailability.
The living notebook
Explore the model
Interactive lab · reliability
Replica counts and the missing failure graph
Change replica count n and unavailable count k. Inspect up = n − k and majority = floor(n/2) + 1, then explain which common cause could remove several replicas together.
- Available replicas
- 4 of 5
- Majority needed
- 3
- Majority available?
- Yes
A replica count and a majority threshold, without a consensus protocol. Playback highlights fixed replica states. Having a majority alone does not establish linearizability, durability or failure independence. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA majority count shows a capacity condition; it does not establish independence, consistency, or durability.
Pause & reason
Check your understanding
Your turn
Try it yourself
A required frontend succeeds with probability 0.999. Conditional on frontend success, two independent storage alternatives each succeed with probability 0.98. With no other failures, compute operation availability and state one omitted common cause.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Compute the conditional probability that at least one storage alternative succeeds, then multiply by frontend success.
Compare with the solution
Both stores fail with probability 0.02² = 0.0004, so conditional storage availability is 0.9996. Overall availability is 0.999 × 0.9996 = 0.9986004, or 99.86004%. A shared bad software rollout could invalidate independence between the stores; a real model would need its joint failure effect.
Keep the idea
Take it with you
- Model the user's required operation and its conditional dependency paths.
- Replica independence is an assumption about failure causes, not a machine count.
- Use cut sets and controlled tests to make resilience claims falsifiable.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.