Protocols
Saved & recent

Heartbeat and keepalive

Also called: heartbeat message, keepalive, PING

A heartbeat is a periodic message used to observe whether a peer or connection still responds. Keepalive traffic can also prevent some idle connections from being discarded. The protocol defines the expected reply, timing and action when responses do not arrive; different layers can use different mechanisms.

For example, gRPC can use HTTP/2 PING frames and their acknowledgments on a long-lived connection. A missed reply may reflect a broken path, a stalled peer or delay; it is not perfect proof that the remote process has died. A successful reply shows connection responsiveness, not necessarily that the application’s database or business operations are healthy.

Related
Timeout, HTTP/2, WebSocket, TCP keepalive
Further reading
gRPC — Keepalive
HTTP/2 client HTTP/2 peer PING PING + ACK next PING timeout window suspected failure connection responsiveness application service health
An acknowledged PING tests the connection. Missing the configured deadline raises suspicion; service health needs a separate check.

View in the full Protocols collection