Cycle orchestration¶
Two budgets decide how much one cycle does: how many assignments it may work, and how much telemetry it may flush. Both are computed rather than configured, so a cycle's cost follows from the node's current state.
The worker budget¶
The budget is the smallest of three numbers:
capacity_available what the node has free
queue_depth what is waiting locally
governor bound what the performance governor allows
Where the governor sets no bound, the node's available capacity stands in for it. The result is floored at zero, so a node with no capacity or an empty queue does no worker work rather than a negative amount.
Why the smallest of three¶
Each of the three is a different kind of limit, and any one of them can be the binding one:
| Binding limit | Means |
|---|---|
| Capacity | The node is full; work waits for slots |
| Queue depth | Nothing is waiting; the node is idle by demand |
| Governor | The node is being held below its capacity deliberately |
A node doing less than you expect is answered by which of the three is smallest, and the three are distinguishable rather than collapsing into one "busy".
The flush budget¶
The completion phase flushes telemetry channels within a budget: status, events and logs each have their own allowance.
Shutdown changes it. When shutdown has been requested the budget switches to its drain values, so a node on its way out prioritises delivering what it holds over maintaining its normal cadence.
That switch is why a draining node's telemetry behaviour looks different from a running one's, and it is intentional rather than a symptom.
Execution can be blocked outright¶
Preparation resolves whether runtime execution is allowed at all, and a reason when it is not. The worker phase receives both, so a node that is not executing carries the reason rather than appearing merely idle.
The worker budget¶
flowchart LR
subgraph IN["INPUTS, from preparation"]
direction TB
CA["capacity_available"]
QD[("Local queue depth")]
GV["Performance governor bound"]
EX{{"Execution allowed?<br/>with reason"}}
end
MIN{{"min of three,<br/>floored at zero"}}
subgraph WK["WORKER PHASE"]
direction TB
SL["Worker slots"]
end
CA --> MIN
QD --> MIN
GV --> MIN
MIN -->|"budget"| SL
EX -->|"allowed, or blocked with reason"| SL
Three inputs meet at the minimum, and the smallest sets how many slots the worker phase fills. The fourth input bypasses the minimum: when execution is not allowed, the phase does nothing and carries the reason.
The cycle reports both counts¶
Worker execution returns what it processed and what failed, separately. A cycle that processed nothing and failed nothing is idle; one that processed nothing and failed several is not, and the two are told apart without reading logs.
Why budgets rather than limits per assignment¶
A budget bounds the cycle, so the loop's period stays predictable whatever the backlog. A backlog drains across cycles at a rate the node's own capacity and governor decide, rather than one cycle attempting everything and making the node's rhythm depend on how much arrived.
See The worker reconcile pipeline for what happens to each assignment inside the budget.