Failure Detection
Slow and failed components can produce similar remote signals.
- SignalSignal: An observable clue triggers an evaluation.
- SuspicionSuspicion: A timeout raises suspicion, not proof.
- ResponseResponse: The response follows criticality and evidence.
Context
Why this is important
Detection provides a sound basis for a targeted response.
Detection provides a sound basis for a targeted response.
Failure Detection: inspect the decision
The shop example uses the existing shared database and seven modules. Any added service or deployment model is a hypothetical extension. During checkout, a worker sends a heartbeat every five seconds. After several missed reports, the controller marks it suspect and routes new work to healthy instances. A delayed heartbeat can result from network load while the worker is processing a payment. The in-flight job therefore remains queryable by its identifier; detection does not trigger a second charge. The team measures detection time and false alarms, then tunes the threshold to recovery objectives.
This is how you read the picture
- Signal Signal
- Suspicion Suspicion
- Response Response
| Concept | Meaning | Review question |
|---|---|---|
| Signal | An observable clue triggers an evaluation. | What does a missing heartbeat mean for the worker? |
| Suspicion | A timeout raises suspicion, not proof. | Which measurement shows whether detection meets the recovery objective? |
| Response | The response follows criticality and evidence. | When should the team change the threshold? |
Benefits & limitations
Helps if:
- Detection provides a sound basis for a targeted response.
- Define heartbeat timing, threshold, and follow-up action together.
Boundaries
- One missing signal cannot distinguish a network fault from a process crash.
- Probe intervals trade faster response for a higher risk of false alarms.
In practice
- Set the heartbeat interval and suspicion threshold from the recovery objective, and record which follow-up action begins when a worker is marked suspect.
- Delay heartbeats during a payment deliberately and compare false suspicions with actual process termination; ensure the same order identifier cannot trigger a second payment.
- Measure detection time and false-positive rate under normal and elevated network load, and adjust the threshold only when its effect on recovery and duplicate processing is clear.
Read the detailed explanation
A component may be slow, isolated, or crashed; from a distance these states can look alike. Failure detection therefore separates observation, suspicion, and confirmed diagnosis.
Heartbeats, active health checks, and timeouts provide time-bound signals. Their meaning depends on interval, threshold, network path, and probe scope. Detection starts a coordinated response; it does not prove a process crash.
The shop example uses the existing shared database and seven modules. Any added service or deployment model is a hypothetical extension. During checkout, a worker sends a heartbeat every five seconds. After several missed reports, the controller marks it suspect and routes new work to healthy instances. A delayed heartbeat can result from network load while the worker is processing a payment. The in-flight job therefore remains queryable by its identifier; detection does not trigger a second charge. The team measures detection time and false alarms, then tunes the threshold to recovery objectives. heartbeat and load balancing help compare this decision with adjacent concerns.
Check your understanding
Test yourself in three stages
ReadingCheck in the picture
What does a missing heartbeat mean for the worker?
View the solution with justification
It marks the worker as suspect; network load and process failure remain possible causes.
ApplyingTransferred to a new situation
Which measurement shows whether detection meets the recovery objective?
View the solution with justification
Measure detection time and false-positive rate across representative faults.
EvaluateWeighing an alternative
When should the team change the threshold?
View the solution with justification
When measurements show response time or false positives miss the agreed objective.
Explore further
Find variants and links to standalone concepts here.
Heartbeat
A heartbeat shows that a process sent a signal recently; the threshold determines when that signal counts as late. It supports timely detection, while remaining sensitive to interval, network path, and process pauses.
Further building blocks
References
- Heartbeat and active health checks (opens in new tab)Explains periodic heartbeats as a failure-detection mechanism.
- Implementing health checks (opens in new tab)AWS describes readiness and liveness probes and their operational effects.
- Choosing the right health check (opens in new tab)Compares local health checks with checks of dependencies.