AI Glossary / Data engineering and architecture / Intermediate

Failure detector

Definition

A failure detector is a mechanism that provides information about whether components in a distributed system may have failed. In practice, it often produces suspicions from missing or delayed messages rather than certain knowledge that a remote component has stopped.

What it means

A system needs some basis for deciding when to stop waiting, redirect work or begin recovery. A failure detector supplies evidence for those decisions. It does not necessarily perform the recovery or decide which component is allowed to become the new leader.

The difficulty is that a crashed process and a slow process can look alike from a distance. A message might be delayed by congestion, a paused runtime or a network partition. The receiving process sees an absent response, not the underlying cause.

Theoretical failure detectors are abstractions with stated guarantees. Practical implementations approximate useful behavior under assumptions about timing and communication. A detector described as unreliable can still be valuable when the surrounding protocol is designed to tolerate its mistakes.

How it works

An implementation exchanges heartbeat messages or probes a service periodically. The observer tracks the last response and suspects a failure when a timeout or another threshold is exceeded. Adaptive methods use recent arrival patterns to judge how unusual the current delay is.

The literature distinguishes completeness and accuracy. Completeness concerns whether actual crashes are eventually suspected by the required observers. Accuracy constrains mistaken suspicions of processes that have not crashed. Different detector classes make different versions of these promises, sometimes only after an unspecified stabilization period.

Operationally, a shorter timeout can detect genuine outages sooner but may also trigger more false suspicions. A longer timeout tolerates more delay while increasing the time spent waiting after a real crash. There is no universally correct value independent of workload and environment.

The system must also define what follows a suspicion. Marking a node unreachable, removing membership and authorizing another writer are distinct actions. A failure detector alone does not prevent an isolated original writer from continuing to act.

Three practical examples

  • A cluster monitors heartbeat arrivals and marks a member unreachable when delays exceed its configured tolerance.
  • A job scheduler investigates a worker that stops reporting progress before deciding whether to reassign its job.
  • A replication protocol uses failure suspicions as an input to leader selection while separately enforcing rules about who may commit writes.

Think of it this way

Think of expecting a colleague to check in at an agreed time. Missing the check-in gives you a reason to investigate, but it does not reveal whether the colleague is unavailable or the communication channel failed.

The analogy is limited because software protocols need precise assumptions and actions. A useful detector makes uncertainty manageable; it does not turn silence into direct observation of another machine's internal state.

Worked example

Comparing two timeout choices

An invented worker sends a heartbeat every second. Its observer receives one at time zero, then no more messages until time four because of a temporary communication delay. The worker remains alive throughout.

With a three-second timeout measured from the last received heartbeat, the observer raises a suspicion at time three. When communication resumes at time four, that suspicion may be withdrawn. It was a false suspicion of a crash.

With a five-second timeout, the same delay would not trigger a suspicion. However, if the worker had actually crashed immediately after time zero, that setting would delay suspicion until time five instead of time three.

The example assumes exact timers and omits processing overhead to make the tradeoff visible. Detection latency depends on probe scheduling, message handling and other delays. Neither setting proves that an unresponsive worker has stopped.

Illustrative case study

A fictional image-analysis service sees repeated worker replacements during busy periods. The operations dashboard labels each replacement a machine failure. Investigation shows that some workers pause while memory is reclaimed and then resume normally.

The team records separate events for missed heartbeats, unreachable status and confirmed recovery actions. It tests timeout behavior under load and investigates the long pauses instead of only increasing the threshold.

Because a worker may resume after its job is reassigned, the job protocol also checks an assignment generation before accepting results. That protects the workflow from stale workers independently of the detector's sensitivity. The case illustrates why detection quality and recovery correctness must be evaluated together.

Common misconceptions and mistakes

  • A missing heartbeat proves a crash. Delay, overload or a communication failure can cause the same symptom.
  • Faster detection is always better. Aggressive thresholds can create unnecessary failovers and instability.
  • An unreliable detector is useless. Protocols can use imperfect suspicions under specified guarantees.
  • Declaring a node failed stops it. The declaration changes an observer's view; it does not automatically disable the remote node.

Business use

Failure detection affects availability, recovery time and operational noise. Teams should measure both detection delay during genuine failures and mistaken suspicions during workload variation.

Separate health signals by what they actually test. A responding process may be unable to access its database, while a delayed heartbeat does not prove that every application function is broken. Define the service boundary and the action each signal is allowed to trigger.

For AI services, long model-loading or computation phases can interact with monitoring if they delay the heartbeat path. Test realistic activity and retain evidence to distinguish application overload from infrastructure loss. Do not interpret every replacement as proof of hardware unreliability.

People also ask

Is a failure detector the same as a health dashboard?

No. A dashboard presents observations; a detector applies a rule or abstraction that supplies failure information to a system.

Can a detector make mistakes and later correct them?

Yes. Many practical detectors update suspicions when communication resumes.

Does eventual accuracy mean a known maximum delay?

Not necessarily. Formal eventual properties can promise behavior after some time without specifying a deadline available to the application.

Check your understanding

A cluster declares a worker unreachable and assigns its job elsewhere. Does that declaration alone prevent the original worker from submitting a late result?

Answer: No. The worker may still be running. The job or storage protocol needs a separate way to reject stale or duplicate effects.

Related terms

  • Completeness
  • Accuracy
  • Heartbeat
  • timeout
  • failure suspicion
  • network partition
  • leader election
  • fencing

Learn next

Read network partition and fencing. For one recovery workflow, identify the observation that triggers suspicion, the decision that authorizes replacement and the mechanism that rejects stale actions.

More in Data engineering and architecture

  • Faceted classification - Faceted classification organizes information through several distinct characteristics, called facets, that can be combined to describe or retrieve an item.
  • Fact table - A fact table is a table in a dimensional data model that records measurable business events, observations or relationships at a defined level of detail.
  • Fail-stop - Fail-stop describes a failure behavior in which a component halts instead of continuing to produce externally visible erroneous results.
  • Failure transparency - Failure transparency is the extent to which a system hides component failures and recovery details from its users or applications while preserving the...
  • FAIR data - FAIR data is data managed according to principles intended to make it Findable, Accessible, Interoperable and Reusable.
  • Fat Relation - Fat relation is an informal term for a relation with many attributes, often described more plainly as a wide table.

Sources

Chandra and Toueg, Unreliable Failure Detectors for Reliable Distributed Systems: https://research.ibm.com/publications/unreliable-failure-detectors-for-reliable-distributed-systems. Primary research abstract on completeness, accuracy and distributed protocols.

Cornell University, Failure Detectors: https://www.cs.cornell.edu/info/people/sam/FDpapers.html. Authors' research collection and abstracts.

Akka, Phi Accrual Failure Detector: https://doc.akka.io/libraries/akka-core/2.10.3/typed/failure-detector.html. Primary implementation documentation illustrating heartbeat sensitivity and false suspicions; no configuration value is recommended here. The timing example and image-service case are original.

Previous: Failure bias Next: Failure rate

  • Home
  • Daily AI Updates
  • Blog
  • AIFBL Academy
  • AI Glossary
  • Products and Tools
  • Store
  • Free CFO AI Prompt Pack
  • About Shihan Sheriff
  • Privacy Policy
  • Terms of Use
  • Refund Policy
  • Cookie Policy
  • Earnings Disclaimer