Failover Capacity Planning: Headroom Math and a Tested Sim

Failover capacity planning: why N+1 fails when failover traffic hits a degraded pool. Get the headroom formula and a tested Node.js 22 simulation.

TL;DR

  • Problem: A failover target that is healthy can still collapse when failed-over traffic lands on a pool already missing capacity.
  • Pattern: Size the surviving pool for base load plus failover load, with part of it offline, and add load shedding.
  • When to use: Any service that other systems fail over to, such as gateways, shared APIs and DR sites.
  • Trade-off: You pay for idle capacity and reject some requests on purpose instead of failing everything.

Failover capacity planning means sizing the pool that receives failed-over traffic so it can carry its own load, the incoming load and a planned amount of offline capacity at once. In our simulation, 100 servers survived 14% offline or 30 units of failover alone, but collapsed when both happened together.

Failover capacity planning is the practice of sizing a standby or secondary resource pool so it can absorb redirected traffic without exceeding its safe utilisation. It treats capacity already lost to maintenance or faults as part of the calculation, not as a separate event.

Failover capacity planning is the part of resilience that most diagrams skip. Teams draw an arrow from the failed component to the backup and stop. The arrow says nothing about whether the backup has room.

The Microsoft 365 outage of 12 November 2026 is a recent, public reminder. A Cloud Security Alliance research note says extra Teams failover traffic hit gateway servers while about 14% of gateway capacity was offline. This post turns that pattern into arithmetic, runnable code and a test plan. We have no inside knowledge of Microsoft’s systems, so we cite only what the published reports state.

What happened in the Microsoft 365 outage that makes failover capacity planning matter?

Two published accounts agree on the core facts. The outage ran from 12 November 2026 16:20 UTC to 13 November 16:10 UTC, about 24 hours, according to the CSA note. A defect from a July gateway update had run for more than three months without visible effect. Extra Teams failover traffic triggered it while about 14% of gateway capacity was offline.

365Fanatic, summarising Microsoft’s final report, says Teams failed over at 01:07 UTC on 12 November to a gateway that also serves Exchange Online. It reports that more than 80% of gateway servers were unresponsive at the lowest point. The sources differ on why the 14% was offline: 365Fanatic says routine operations, while Felipe Ferreira’s analysis of the preliminary report says an unrelated issue.

The root cause was a software defect, not missing servers. More headroom would not have removed that defect. The lesson is narrower: the trigger needed reduced capacity and extra traffic together. Our earlier post on the outage covers the health-check side.

Why does a naive N+1 failover plan fail?

A naive plan checks that a healthy target exists. It never checks that the target has room. N+1 means one spare unit. That is enough for one failed unit, not for a whole service’s traffic arriving at once.

// Naive: "is the backup alive?" says nothing about load.
function canFailover(target) {
  return target.healthy;
}

Capacity can also be missing before the failover starts. Maintenance windows, rolling deploys and unrelated faults all take units out. Failover load then lands on a pool that is already short.

How do you do failover capacity planning step by step?

Start with requirements. Functionally, the pool must serve its own traffic plus redirected traffic. Non-functionally, utilisation must stay below a ceiling that you choose, because latency climbs as servers near 100%.

  1. Measure base load at peak, in units of one server’s capacity.
  2. List every source that can fail over to this pool and measure each one’s peak load.
  3. Choose the offline fraction to survive: maintenance, rolling deploys and one fault.
  4. Choose a utilisation ceiling for survivors, for example 80%.
  5. Compute servers needed = (base + failover) ÷ ((1 − offline) × ceiling).
  6. Add admission control so overload is shed at the edge, not absorbed until servers fail.

Here is the back-of-envelope estimate. All figures are assumptions for illustration: base load of 60 server-units, failover load of 30 units, 14% offline. Total demand is 90 units on 86 surviving servers, which is 105% utilisation (90 ÷ 86 = 1.047). With an 80% ceiling you need 90 ÷ (0.86 × 0.8) = 131 servers, not 100.

The data model is small: per pool, a record of capacity_units, offline_units, base_load and a list of failover sources with their peak loads. An API sketch: GET /pools/{id}/headroom returns the computed margin, and your failover automation refuses to redirect when the margin is negative.

What does a tested failover simulation look like in Node.js?

We wrote and ran this simulator on Node.js 22. It models a pool of identical servers. Each fails above 100% utilisation, and its load moves to survivors. These rules are our assumptions, not Microsoft data.

// Failover cascade simulator. All parameters are assumptions, not Microsoft data.
// A pool of identical servers each has capacity 1.0. A server that is asked to carry
// more than 1.0 fails (assumption: hard failure at 100% utilisation). Its share is
// redistributed over survivors and the check repeats until stable.
export function simulate({ servers, baseLoad, failoverLoad, offline, shed = false, shedTarget = 0.9 }) {
  let alive = servers - offline;               // servers already out for maintenance
  const total = baseLoad + failoverLoad;       // in "server capacities"
  const history = [];
  for (let round = 0; round < 200; round++) {
    if (alive <= 0) { history.push({ alive: 0, util: Infinity }); return { survived: false, alive: 0, history }; }
    let served = total;
    if (shed) served = Math.min(total, alive * shedTarget);   // admission control: reject excess
    const util = served / alive;
    history.push({ alive, util: +util.toFixed(3) });
    if (util <= 1) return { survived: true, alive, history, shedFraction: +(1 - served / total).toFixed(3) };
    // one server fails per round (assumption), load re-spreads
    alive -= Math.max(1, Math.ceil(alive * 0.1));
  }
  return { survived: false, alive, history };
}
// Closed form: the pool survives without shedding iff (base+failover) <= servers - offline
export function minServers({ baseLoad, failoverLoad, offlineFraction }) {
  return Math.ceil((baseLoad + failoverLoad) / (1 - offlineFraction));
}

We then ran 100 servers with a base load of 60 units. The command was node run.mjs, and the assertions in it passed. Raw results:

┌─────────┬──────────┬─────────┬───────────────────────┬───────────┬─────────────────────────┐
│ failover│ offline  │ noShed  │ first utilisation     │ rounds    │ withShed                │
├─────────┼──────────┼─────────┼───────────────────────┼───────────┼─────────────────────────┤
│ 0       │ 0%       │ survives│ 0.600                 │ 1         │ survives, sheds 0.0%    │
│ 0       │ 14%      │ survives│ 0.698                 │ 1         │ survives, sheds 0.0%    │
│ 10      │ 14%      │ survives│ 0.814                 │ 1         │ survives, sheds 0.0%    │
│ 20      │ 14%      │ survives│ 0.930                 │ 1         │ survives, sheds 3.2%    │
│ 30      │ 0%       │ survives│ 0.900                 │ 1         │ survives, sheds 0.0%    │
│ 30      │ 14%      │ COLLAPSES (alive=0)│ 1.047      │ 28        │ survives, sheds 14.0%   │
└─────────┴──────────┴─────────┴───────────────────────┴───────────┴─────────────────────────┘

Read the last two rows together. A pool with 30 units of failover and no offline servers sat at 90% utilisation and survived. The same pool with 14 servers offline reached 104.7% and failed every server in 28 rounds. With shedding at a 90% target, it rejected 14.0% of requests and survived. A closed-form check agrees: minServers returned 105 for the failing case and 70 without failover.

What are the trade-offs of failover capacity planning?

Headroom costs money. Idle capacity is the price of surviving the combined case. Shedding costs user experience: some requests fail on purpose.

  • Shedding the wrong traffic. Reject low-priority work first, or shedding hurts critical paths.
  • Retry amplification. Rejected clients retry. Pair shedding with retry budgets and jitter.
  • Automatic redirection. Automation that moves traffic can worsen an overload. In the M365 case, Ferreira’s report says Microsoft disabled some automated traffic redirection at 01:53 UTC on 13 November.
  • Stale inputs. Failover load figures drift as products grow. Recompute them on a schedule.

When should you not use this approach?

Skip heavy headroom for batch or internal tools where hours of downtime are acceptable. Skip it for pools that scale out automatically in seconds, if you have tested that scaling under failure. Headroom also does nothing against a latent software bug. Staged rollouts handle that; see the table below.

How do you test failover capacity before an incident?

The CSA note says Microsoft’s load testing missed the defect because of the traffic mix and hardware SKUs used in its labs. Test with production-like mixes and hardware. Then run these checks:

  1. Take the planned offline fraction out of a staging pool, then redirect the largest failover source.
  2. Replay recorded production traffic, not uniform synthetic requests.
  3. Confirm that shedding starts before survivors exceed your ceiling.
  4. Confirm that clients back off when rejected.

Why must disaster recovery stay independent of production?

The same CSA note quotes a Workday incident on 13 and 14 November in which tenanted services within the DR site “unexpectedly connected to Production databases” during a maintenance check, leaving data inconsistent. A DR path that shares databases, credentials or configuration pipelines with production can fail together with it. The note recommends DR independent of production in credentials, network paths and configuration pipelines. Treat that as a design review question for every standby.

How do the common approaches compare?

Approaches to surviving failover load
Approach Handles Does not handle Cost
N+1 spare One failed unit A whole source failing over onto a degraded pool Low
Utilisation ceiling (headroom) Failover plus planned offline capacity Latent bugs, unplanned spikes beyond the plan Idle servers
Load shedding Overload beyond the plan Critical traffic if priorities are wrong Rejected requests
Staged rollouts with auto rollback Bad changes reaching all servers at once Capacity shortfalls Slower deploys
Independent DR site Shared-fate failures Cold-start capacity gaps Duplicate infrastructure

Cloudflare’s fail-small resilience plan, published 19 December 2025, covers the staged-rollout row. It commits to controlled, health-gated rollouts for configuration changes with automatic rollback. Combine both approaches; they close different gaps.

Interview questions this topic prepares you for

How would you size a failover pool?

Sum the pool’s own peak load and every failover source’s peak load. Divide by the surviving fraction after planned offline capacity, then by a utilisation ceiling such as 80%. State each assumption. Then add admission control for demand beyond the plan, and explain which traffic you would shed first and why.

Follow-up they may ask: How often do you recompute the inputs?

Why is N+1 not enough for failover?

N+1 covers one unit failing. Failover can move an entire service’s traffic onto a pool in one step. If maintenance has already removed units, the surviving pool can pass 100% utilisation and fail in a cascade. Capacity math must include both the redirected load and the offline fraction.

Follow-up they may ask: What would you alert on?

How do you keep DR from failing with production?

Separate credentials, network paths, data stores and configuration pipelines. Test that the DR site cannot reach production databases. Run failover drills that check isolation, not only recovery time. Review shared dependencies such as DNS and identity providers.

Follow-up they may ask: How do you test isolation safely?

What should failover automation do when the target is full?

It should refuse or limit the redirect, shed low-priority traffic and page a human. Blindly redirecting turns one problem into two. Expose a headroom signal that automation reads before it acts.

Follow-up they may ask: How do you prevent flapping between targets?

The NexGismo verdict: My recommendation: stop reviewing failover as a diagram and review it as a number. For every pool that receives redirected traffic, write the headroom formula next to the architecture diagram and recompute it each quarter. Add load shedding before you add more servers, because it protects you from the cases the formula misses.

  • Failover capacity planning sizes a pool for its own load, incoming failover load and offline capacity at the same time.
  • In our simulation, 100 servers survived 14% offline or 30 failover units alone, but collapsed when both happened together.
  • Required servers equal (base + failover) divided by (1 − offline fraction) times a utilisation ceiling.
  • Load shedding at a 90% target let the same simulated pool survive by rejecting 14.0% of requests.
  • Headroom does not fix latent software defects; staged rollouts with automatic rollback address those.
  • A DR site that shares databases or credentials with production can fail with production.

Frequently Asked Questions

What is failover capacity planning?

Failover capacity planning is sizing a backup or secondary pool so it can carry its own traffic plus redirected traffic, even with some capacity offline. You calculate the surviving utilisation and keep it under a chosen ceiling, such as 80%, then add load shedding for demand beyond the plan.

How much spare capacity do you need for failover?

It depends on your inputs. The formula is servers = (base load + failover load) ÷ ((1 − offline fraction) × utilisation ceiling). With our assumed 60 units base, 30 units failover, 14% offline and an 80% ceiling, the answer is 131 servers.

Why did the Microsoft 365 outage on 12 November 2026 last about 24 hours?

According to the Cloud Security Alliance note, a latent defect from a July gateway update was triggered by extra Teams failover traffic while about 14% of gateway capacity was offline. Recovery involved reverting the change in stages. We rely on published third-party summaries, not Microsoft’s full report.

What is load shedding in system design?

Load shedding means rejecting some requests on purpose when demand exceeds what the system can serve safely. It keeps healthy servers under a target utilisation, so the rest of the traffic succeeds. Reject low-priority work first, and pair it with client backoff.

Should disaster recovery share a database with production?

No. Shared databases, credentials or configuration pipelines let a production fault reach the DR site. The CSA note recommends DR independent of production in credentials, network paths and configuration pipelines, and cites a Workday incident where DR services connected to production databases.

Conclusion

Failover only helps if the target can carry the load. The arithmetic is short: add the loads, remove the offline capacity, apply a ceiling, and compare with what you run. Run that check for each pool that other systems depend on. Then test it with realistic traffic and add shedding for the rest. For related design work, read our guides on retry storm prevention and the rate limiter design. You can adapt the simulator above to your own numbers.

Sources