Learning path

Full curriculum

Full curriculum

Unit content

Heartbeats, failure detection and leases

A distributed node cannot generally distinguish a crashed peer from a very slow or disconnected one using silence alone.

A heartbeat is a periodic liveness message. Missing enough heartbeats lets another node suspect failure, but suspicion is not proof: delay or packet loss can produce the same observation.

A lease grants some authority for a bounded period according to a timing assumption. If a node holds a valid lease, another participant can avoid granting conflicting authority until the lease is known to have expired.

Leases can simplify ownership and leadership, but their safety depends on assumptions about clocks, expiry and how renewal is performed.

Failure detection in distributed systems is therefore an inference mechanism. Protocols must remain safe when a healthy node is suspected or when communication is temporarily interrupted.