Skip to content

Detection

Both ends of a link notice a break, at different speeds, by different means, and they take different actions. This page is who notices what and how quickly, because the gap between the two detection times is the window where the system is acting on stale belief.

Who notices, and how

flowchart LR
  subgraph N["THE NODE, notices on the call"]
    direction TB
    CPC["Control-plane client<br/>classifies per operation"]
    TS[("Transport state<br/>degraded_cp_unreachable")]
    CPC --> TS
  end
  subgraph C["THE CONTROL PLANE, notices by absence"]
    direction TB
    HB[("Heartbeat rollup")]
    LED[("Lease expiry")]
    LC["Lease controller"]
    LED --> LC
  end
  CPC x--x|"the broken link"| HB

Each side records the break in its own state and never learns the other's. The node's record changes on the first failed call; the control plane's changes only when a lease it is watching runs out.

The node detects immediately, because it is the side making the call. The control plane detects by absence, which takes as long as the thing that stops arriving takes to be missed.

Detection times

Detected by Signal Noticed within
The node A failed call to the control plane The call itself
The node A failed or refused call to a kernel The call itself
The control plane Heartbeat absence The node's heartbeat interval
The control plane Assignment lease expiry The 30 second lease, renewed every 10
The control plane Lease requeue by the controller The next controller cycle after expiry
The kernel The return lane's consumer stops acknowledging The next envelope it tries to deliver

The lease is the tightest control-plane signal, and it is the one that matters, because it is the one that releases work for someone else. A node that stops renewing loses its assignments about 30 seconds later, not when someone notices the node is gone.

The node classifies before it reacts

A failure is classified per operation rather than as a single link status. Register, heartbeat, pull, watch and report each carry their own attempt count and their own backoff, so one failing operation does not put the others into retry.

The backoff is exponential from a base, capped, and never below any retry_after the control plane asked for. It is also jittered deterministically, seeded from the node's identity, the operation and the attempt number, scaled between 0.75 and 1.25.

Deterministic jitter does two things at once: a fleet of nodes recovering together spreads its retries instead of arriving as one wave, and the same node retrying the same operation is reproducible rather than random.

Some failures are the node's own registration

Not every failed call means the control plane is unreachable. A call answered with the node's registration being unknown is a different fault, and the node handles it by clearing its registration and registering again rather than by retrying the original call:

agent registration lost; re-registering

Telling these apart matters because retrying a call under a registration the control plane has forgotten would never succeed.

A refusal is an answer and a failure is the absence of one. The node retries failures with backoff from 0.1 seconds doubling to a 30 second cap, and stops on any of the seven terminal refusals without consuming its retry budget.

See Detecting a control plane link break and Detecting a kernel link break.