Sizing the Supervisor Tier So a Lost Replica Doesn't Release the Swarm
The usual N+1 count for supervisor replicas is wrong for agent swarms. It asks whether the remaining replicas can carry the steady load, and leaves out the backlog that builds while the system is still working out that a replica is dead. The sizing model below treats that detection window as the dominant term. It carries one calculation from heartbeat period to replica count, and every figure in it is an estimate.
The quantity that actually matters
A supervisory tier has one job: return a guardrail verdict for each proposed agent action before the action is allowed to reach a tool gateway. When a replica dies, its share of verdict requests keeps arriving. Nobody reroutes them until the failure detector declares the replica gone, and that takes the heartbeat period multiplied by the number of missed beats you tolerate. This design uses a heartbeat period of 250 ms and declares a replica dead after three missed beats, so the detection window is an estimated 750 ms. Agents are fail-closed, which means no action runs without a verdict. During that window the orphaned requests queue up instead of running unsupervised. Safety holds, but you pay in latency, and the latency lands on whoever is left.
Carrying the numbers through
Assume each replica sustains an estimated 40,000 guardrail evaluations per second, and the swarm peaks at an estimated 90,000 per second. Naive N+1 sizing gives three replicas for load plus one spare, so four. Now run the failure: the dead replica was carrying a quarter of peak, about 22,500 requests per second (estimate), and over the 750 ms window it strands roughly 16,900 requests (estimate). The three survivors have a combined capacity of 120,000 per second against 90,000 of live traffic, which leaves about 30,000 per second of headroom (estimate) to drain the backlog. Draining takes about 0.56 s (estimate). That is more than two heartbeat periods during which every agent sees inflated verdict latency, and some of them will hit their own action timeouts and retry, which feeds more load into the backlog. With five replicas the same arithmetic gives a stranded backlog near 13,500 (estimate), survivor headroom near 70,000 per second (estimate) and a drain time around 0.19 s (estimate), which fits inside a single heartbeat period.
Error bars and the decision rule
The per-replica throughput figure carries most of the uncertainty, because guardrail cost depends on how often a request escalates from cheap policy checks to a model-based classifier. A shortfall of about a third in that figure puts even the five-replica design back outside the window. So treat the capacity number as something to measure under the real escalation mix, and don't copy it from a benchmark. The decision rule is simple: add replicas until the survivors can absorb the stranded backlog of the detection window and drain it within one heartbeat period at peak load. If you can't afford that, shorten the heartbeat, but accept that a shorter period raises false failovers caused by garbage collection pauses and network jitter. The failure mode that actually hurts is not a slow drain but split brain. A replica that only paused comes back, believes it still holds authority, and issues resume commands that contradict the new owner's halt.
The fix borrows from functional safety practice in the IEC 61508 family: every supervisory command carries a monotonically increasing epoch issued by a separate consensus store, and every tool gateway rejects commands from an older epoch, so a returning replica is fenced at the actuator, not trusted to notice its own staleness.
Technical FAQ: Why not just make the heartbeat much faster and keep four replicas?
A faster heartbeat shrinks the backlog in proportion, but it also brings the detection threshold closer to the normal pause behaviour of the replica runtime, so you trade drain latency for spurious failovers. Each of those failovers forces an epoch change and a brief stall across the swarm. Pick the heartbeat from the measured pause distribution of your supervisors, then size the replica count to fit it, not the other way round.