---
library: "bootstrap"
slug: "Heartbeat"
name: "Heartbeat"
ref: "Heartbeat#c5df"
hash: "sema:Heartbeat#mh:SHA-256:c5dfefe91d5460716f19e001290b47c3853173b17f0b6914793f6f51a41903ef"
type: "Primitives"
layer: "Infrastructure"
version: "0.11.0"
root: "a6a3d1ff0f982ee30430c5b42f3784c8ec901fd68482cfc1bc30899c1e5e48c5"
license: null
url: "https://semahash.org/vocabularies/bootstrap/patterns/Heartbeat"
---

# Heartbeat

Liveness detection via periodic signals

Infrastructure · Primitives

## Mechanism

Periodic Liveness [Signal](https://semahash.org/vocabularies/bootstrap/patterns/Signal.md): An entity emits [Signal](https://semahash.org/vocabularies/bootstrap/patterns/Signal.md) (Heartbeat) every interval I. Missing K consecutive heartbeats triggers failure detection. Heartbeat may include health metrics. Receiver tracks last-seen timestamp. It feeds into the [Quorum](https://semahash.org/vocabularies/bootstrap/patterns/Quorum.md) detector, allowing the collective to identify and prune dead nodes.

## Invariants

- Missing `timeout_multiplier` consecutive intervals triggers failure DETECTION, which is a suspicion and not a fact about the emitter.
- Emission interval stays within `interval`.

## Parameters

- interval: type=Duration, range=[100ms, 60s], description=Time between heartbeats
- timeout_multiplier: type=Integer, range=[2, 5], description=Missed beats before failure

## Preconditions

- Active component
- [Monitor](https://semahash.org/vocabularies/bootstrap/patterns/Monitor.md)

## Postconditions

- Liveness confirmed

## Failure modes

- False failure detection: the node is alive and its heartbeat was delayed, so absence of signal was read as absence of the emitter.
- Heartbeat outlives usefulness: the emitter is alive and the work it was doing is not, so liveness is reported while progress has stopped.

## Where this came from

—

## Builds on

- [Monitor](https://semahash.org/vocabularies/bootstrap/patterns/Monitor.md) (references)
- [Quorum](https://semahash.org/vocabularies/bootstrap/patterns/Quorum.md) (composes_with)
- [Signal](https://semahash.org/vocabularies/bootstrap/patterns/Signal.md) (accepts)

## Used by

- [Delegate](https://semahash.org/vocabularies/bootstrap/patterns/Delegate.md) (composes_with)
- [ExplainBeacon](https://semahash.org/vocabularies/bootstrap/patterns/ExplainBeacon.md) (references)
- [QuorumPulse](https://semahash.org/vocabularies/bootstrap/patterns/QuorumPulse.md) (references)
- [Responsibility](https://semahash.org/vocabularies/bootstrap/patterns/Responsibility.md) (references)
- [TaskLifecycle](https://semahash.org/vocabularies/bootstrap/patterns/TaskLifecycle.md) (references)

## Identity

- Library: bootstrap 0.11.0 (root a6a3d1ff0f98)
- Ref: Heartbeat#c5df
- Hash: sema:Heartbeat#mh:SHA-256:c5dfefe91d5460716f19e001290b47c3853173b17f0b6914793f6f51a41903ef

## Links

- Page: https://semahash.org/vocabularies/bootstrap/patterns/Heartbeat
- JSON: https://semahash.org/vocabularies/bootstrap/patterns/Heartbeat.json
- Library: https://semahash.org/vocabularies/bootstrap
- Library index: https://semahash.org/vocabularies/bootstrap/index.json
