Sizing the Failover Window in a Supervised Agent Swarm

When the primary supervisor dies, every agent in the swarm runs on its local guardrails until a standby takes over. The length of that gap sets everything else: how long the agent-side lease must be, how much telemetry each agent buffers and how much spare ingest capacity the surviving supervisors need. The model below carries one failover calculation end to end. Every figure in it is an estimate, to be replaced with your own measurements.

The gap the swarm must survive

Write the unsupervised window as T_f = k·h + T_e + T_r. Here h is the heartbeat interval between supervisor replicas, k is the number of consecutive missed beats before a replica is declared dead, T_e is the leader election time and T_r is the time the new leader spends replaying the command log to reach the last committed state. Take h = 250 ms as the working parameter, an estimate typical of a supervisor quorum on a single site LAN, and k = 3 as the first estimate, chosen because isolated lost beats are routine on a loaded hypervisor host and short runs of them still appear under scheduler pauses. If election and replay are each held to the same order as detection, T_f comes to roughly three times k·h. That puts the working figure a little over two seconds, which is the second and final estimate in this model. The error bar is lopsided: you control heartbeat and threshold and they barely move, but election has a long tail because randomized timeouts can collide and force a second round, and replay grows linearly with the log written since the last snapshot. Size for the tail rather than the median, measure T_e at its high percentile under an induced partition, and snapshot often enough that replay never takes longer than detection.

Lease, buffer and headroom fall out of the same number

Each agent holds a supervisory lease of length L, renewed by every command or heartbeat from the leader. When the lease expires, the agent's WebAssembly sandbox drops to a restricted capability set: no new tool calls through MCP, no external writes, only completion of idempotent in-flight work. L must exceed T_f with margin. Otherwise every routine failover halts the whole swarm at once, and the restart storm becomes the outage. The same window sizes the agent-side telemetry ring: with a per-agent event rate r, the buffer must hold at least r·L events so nothing is lost while no supervisor is listening. When the new leader comes up, the whole swarm's backlog of r·L events arrives at once, and that replay burst is what overwhelms survivors that were already running hot. So with N replicas sharing load, each must run in steady state below the ratio of surviving to total nodes, and further below that by enough to absorb the burst within one lease interval.

The failure that breaks the model

Everything above assumes the old leader is dead, and the dangerous case is the one where it is only unreachable. An asymmetric partition lets the deposed leader keep talking to some agents while the quorum elects a successor, so for up to a full lease interval two supervisors issue conflicting commands to the same swarm. Faster detection does not fix this, fencing does: every command carries the leader's election epoch, every agent rejects commands from an epoch lower than the highest it has seen, and the old leader must stop issuing once its own quorum lease lapses, which means that lease has to be shorter than L on the agent side. Functional safety standards such as IEC 61508 frame the problem the right way, as a requirement that the safe state be reachable without the supervisor rather than as an availability target for the supervisor itself.

A rule to size against

Set the agent lease at the measured tail of T_f plus one heartbeat interval, then compare it with the shortest time in which any single agent action can cause irreversible harm, and if the lease is longer than that horizon, either shorten detection or narrow the capabilities granted under lease, because no amount of supervisor redundancy closes a gap the agents are still allowed to act through.

Why not just add more supervisor replicas?

More replicas lower the probability of losing quorum, but they do nothing to T_f, since detection, election and replay work the same way whatever the quorum size. Each added replica also lengthens commit latency on every command. Redundancy buys availability. Only a shorter window or a narrower lease capability buys safety.

Back to AgenticSupervisory · Domains

← Back to AgenticSupervisory
Engineering & Architecture Brief

Sizing the Failover Window in a Supervised Agent Swarm

When the primary supervisor dies, every agent in the swarm runs on its local guardrails until a standby takes over. The length of that gap sets everything else: how long the agent-side lease must be, how much telemetry each agent buffers and how much spare ingest capacity the surviving supervisors need. The model below carries one failover calculation end to end. Every figure in it is an estimate, to be replaced with your own measurements.

The gap the swarm must survive

Write the unsupervised window as T_f = k·h + T_e + T_r. Here h is the heartbeat interval between supervisor replicas, k is the number of consecutive missed beats before a replica is declared dead, T_e is the leader election time and T_r is the time the new leader spends replaying the command log to reach the last committed state. Take h = 250 ms as the working parameter, an estimate typical of a supervisor quorum on a single site LAN, and k = 3 as the first estimate, chosen because isolated lost beats are routine on a loaded hypervisor host and short runs of them still appear under scheduler pauses. If election and replay are each held to the same order as detection, T_f comes to roughly three times k·h. That puts the working figure a little over two seconds, which is the second and final estimate in this model. The error bar is lopsided: you control heartbeat and threshold and they barely move, but election has a long tail because randomized timeouts can collide and force a second round, and replay grows linearly with the log written since the last snapshot. Size for the tail rather than the median, measure T_e at its high percentile under an induced partition, and snapshot often enough that replay never takes longer than detection.

Lease, buffer and headroom fall out of the same number

Each agent holds a supervisory lease of length L, renewed by every command or heartbeat from the leader. When the lease expires, the agent's WebAssembly sandbox drops to a restricted capability set: no new tool calls through MCP, no external writes, only completion of idempotent in-flight work. L must exceed T_f with margin. Otherwise every routine failover halts the whole swarm at once, and the restart storm becomes the outage. The same window sizes the agent-side telemetry ring: with a per-agent event rate r, the buffer must hold at least r·L events so nothing is lost while no supervisor is listening. When the new leader comes up, the whole swarm's backlog of r·L events arrives at once, and that replay burst is what overwhelms survivors that were already running hot. So with N replicas sharing load, each must run in steady state below the ratio of surviving to total nodes, and further below that by enough to absorb the burst within one lease interval.

The failure that breaks the model

Everything above assumes the old leader is dead, and the dangerous case is the one where it is only unreachable. An asymmetric partition lets the deposed leader keep talking to some agents while the quorum elects a successor, so for up to a full lease interval two supervisors issue conflicting commands to the same swarm. Faster detection does not fix this, fencing does: every command carries the leader's election epoch, every agent rejects commands from an epoch lower than the highest it has seen, and the old leader must stop issuing once its own quorum lease lapses, which means that lease has to be shorter than L on the agent side. Functional safety standards such as IEC 61508 frame the problem the right way, as a requirement that the safe state be reachable without the supervisor rather than as an availability target for the supervisor itself.

A rule to size against

Set the agent lease at the measured tail of T_f plus one heartbeat interval, then compare it with the shortest time in which any single agent action can cause irreversible harm, and if the lease is longer than that horizon, either shorten detection or narrow the capabilities granted under lease, because no amount of supervisor redundancy closes a gap the agents are still allowed to act through.

Technical FAQ: Why not just add more supervisor replicas?

More replicas lower the probability of losing quorum, but they do nothing to T_f, since detection, election and replay work the same way whatever the quorum size. Each added replica also lengthens commit latency on every command. Redundancy buys availability. Only a shorter window or a narrower lease capability buys safety.

Related Architecture Specifications (AGENTIC): orchestrationagentic.com · agentichypervisor.com · maintenanceagentic.com

More Technical Articles on agenticsupervisory.com

Empirical Evaluation of Automated Circuit Breaker Latency during Agent Cascades →Detecting Subtle Goal Divergence in Autonomous Multi-Agent Negotiation Swarms →Sizing the Guardrail Plane So a Dead Supervisor Doesn't Leave the Swarm Unguarded →