Failure modes and metastability
How cascades, retry storms, thundering herds, metastable states, split brain and gray failures turn a small fault into an outage, and how to break each loop.
35 min9 steps
By the end you can
- Trace how a cascading failure spreads load from failed replicas to healthy ones, and name what stops it
- Predict how retries at stacked layers multiply load on a failing dependency
- Explain a metastable failure as a trigger plus a sustaining loop, and choose actions that recover from it
- Estimate a thundering herd and spread it with jitter
- Recognise split brain and gray failure, and the mechanisms that contain them
A cascade: the survivors inherit the load
Put the cascade in order
1
Replica crashes
2
Survivors pass saturation
3
Queues grow, timeouts
4
Health checks fail, another ejected
5
Last replicas collapse
Order the stages of a typical cascading failure.
- 1One of four replicas crashes
- 2Queues grow and latency rises past client timeouts
- 3The last replicas receive even more load and fail
- 4The remaining three each receive a third more traffic and pass saturation
- 5Health checks time out and the load balancer ejects another replica
Retry storms multiply
Loading question…
Metastable failure: the trigger is gone, the outage is not
Vulnerable
Efficient but fragile
Trigger
Spike, slow DB, cache flush
Sustaining loop
Timeouts, retries, more load
Trigger gone
Outage continues
Loading question…
Getting out of a metastable state
- Capacity100 %
- Stuck: offered plus retries140 %
- After shedding and no retries70 %
Thundering herds
Causes
- Reconnect after restart
- Cron on the hour
- Keys expiring together
Fixes
- Jitter on delays, TTLs, schedules
- Coalesce refills
- Ramp traffic gradually
Loading question…
Split brain: two leaders
0 s
Link between East hub and primary DC lost
43 s
Failover promoted West primaries
Then
Unreplicated East writes diverged
About a day
Reconciliation, degraded service
See leader election.
Gray failure: healthy to the monitor, broken for users
Monitor sees
- Health check answers in 1 ms
Users see
- 5% of requests time out
Catches it
- Caller-observed success and latency
- Outlier ejection vs peers
- Real dependency checks
Check your mastery, then break something
Sweep type
continuous ramp
state carries over
Shows
retry amplification, cache churn
Score 80% or more. Open the cache-aside design, Scale tab, run a continuous ramp. Then try the cache restart challenge.
Mastery check
6 questions on fresh variants. One attempt each, no time limit. Score 80% or more to master the lesson.
Answer this step to continue.