IRInterview Ready
← System Design

Heartbeats & Health Checks

Reliability

Periodic 'am I alive/healthy' signals that let the rest of the system detect failures and stop routing traffic to (or trusting) a broken node.

A heartbeat is a lightweight, periodic signal ('I'm still alive') sent by a node to a monitor (a load balancer, a service registry, a leader-election system). A health check is the monitor actively probing a node ('are you actually healthy, not just reachable') rather than passively waiting for a heartbeat. Both exist to answer the same core question fast: is this node safe to route traffic to (or trust as leader) right now? Getting the timing right (interval, timeout, and failure threshold before declaring a node dead) is a genuine engineering trade-off, not a triviality.

How it connects

Heartbeats & Health Checks as the source, with the components it typically interacts with.

Load balancers use heartbea…Service registries deregist…Leader-election protocols u…Failed health checks areHeartbeats & HealthChecksReliabilityLoad BalancerTraffic ManagementService DiscoveryReliabilityConsensus &Replication ProtocolsReliabilityCircuit Breaker &BulkheadReliability
  • Load Balancer: Load balancers use heartbeat/health-check results to stop routing traffic to instances that have gone unhealthy.
  • Service Discovery: Service registries deregister (or mark unhealthy) instances that stop responding to heartbeats so discovery never returns dead endpoints.
  • Consensus & Replication Protocols: Leader-election protocols use missed heartbeats as the failure-detection signal that triggers a new election round.
  • Circuit Breaker & Bulkhead: Failed health checks are one of the signals a circuit breaker uses to decide an instance is unhealthy and should be temporarily excluded.