- Book: Hexagonal Architecture in Python
- Companion code: hexagonal-python-examples — every listing from the book, free on GitHub
- My project: Hermes IDE | GitHub — an IDE for developers who ship with Claude Code and other AI coding tools
- Me: xgabriel.com | GitHub
At 01:07 UTC on November 12, 2026, an automated failover moved Teams traffic onto the network gateway servers that Exchange Online also uses. Almost fifteen hours later, around 16:00 UTC, broad failures of gateway servers began in North America. Both times come from Microsoft's final post-incident report.
The impact window runs from 16:20 UTC that day to 16:10 UTC the next, which works out to 23 hours and 50 minutes. The same report says most users couldn't reach their mailboxes through Outlook or other mail clients. Other services that lean on Exchange Online broke in places, though Microsoft says most of them largely stayed online.
Four factors, one of them from July
The final report lists four factors that "together caused" the impact.
- A defect from July. An update enabled on the gateway servers introduced lock contention inside an internal Windows process. Microsoft says neither the defect nor the update applies to broader Windows deployments. Under certain load it exhausted CPU and memory. It affected the newer hardware, which has more cores and so more concurrent requests, and left older models alone. Microsoft's load tests had used the older, lower-core machines. The change ran worldwide for more than three months without impact.
- Reduced capacity. Nearly 14% of the gateway's server capacity was out of service for routine deployment work.
- The Teams failover. A routing issue in US East, on the gateway Teams was using, caused connection timeouts and triggered the move. The report's findings table adds that this one-region problem "moved all Teams traffic worldwide".
- Peak load. US traffic approaching its daily peak.
Microsoft says the three operating conditions together were within normal parameters and would not have caused a disruption without the defect. It also says the incident was not a cyberattack and that the change was not caused by AI tooling.
The report says all services stayed healthy for "~16 hours" after the failover, although its own timeline puts the first broad failures just under fifteen hours later. The same timeline has isolated server failures beginning in some regions between 01:07 and 16:00, with automated mitigations applied. By Microsoft's account, the services were healthy while isolated servers had already begun to fail.
Microsoft's original sits in the admin center (EX1550543/MO1550821). Facts about the incident here come from the final version, dated November 20. The page linked above, by the Microsoft 365 consultancy 365Fanatic, summarises it and offers the 15-page PDF, which has the exact wording I quote. It replaces the preliminary report of November 15, and some details changed: the earlier version put the missing 14% down to "an unrelated issue from the previous day".
The timeline, shortened
All times UTC, from the final report.
| Time | Event |
|---|---|
| Nov 12, 01:07 | Failover puts Teams traffic on the gateway shared with Exchange Online |
| ~16:00 | Broad failures begin in North America |
| 16:17 | Automation starts redirecting traffic to other healthy endpoints |
| 16:20 | High-priority alert, first customer notice, official start |
| 19:20 | Engineers determine total traffic is not up: missing servers are pushing load onto the rest |
| 23:55 | Restored servers, healthy at first, found to go unresponsive again once they receive traffic |
| Nov 13, 07:20 | An update reverting the July change is applied to part of the capacity |
| 11:35 | Europe back to healthy levels |
| 16:10 | No more active customer impact |
| Nov 14, 04:15 | Declared resolved |
The spread came from the safety mechanism. When servers stopped responding, traffic management routed users to other capacity units in the region. Those carried the same defect and now had more load. In under two hours it had hit a significant portion of the North American fleet, and at the lowest point more than 80% of servers were unresponsive. When a region ran short, traffic moved to other regions, which had the same regression. Within about two hours of the first broad failures, servers in every region were affected.

Redirecting load only helps if the next server fails for different reasons than the last one.
The cascade in a few lines of Python
Here is a toy model. Every number in it is invented, picked so the arithmetic fits in your head. Microsoft's report gives no loads or limits. What the model borrows from it is uneven capacity, load that moves to the survivors, and servers that stop responding. The even split and the sharp limit are my simplifications, and the split matters: weight it by capacity and 850 fits in 860.
# gateway.py def cascade(units, load, limit): """units: servers per unit. Returns the units still up.""" alive = list(units) while alive: share = load / len(alive) ok = [n for n in alive if share <= n * limit] if len(ok) == len(alive): return alive alive = ok return alive FULL = [10] * 10 # 100 servers WORN = [8] * 7 + [10] * 3 # 86 servers, 14% out MAIL, MAIL_OFFPEAK, TEAMS = 620, 400, 230 BUGGY, FIXED = 10, 15 # load per server before it hangs # All four conditions: nothing survives. assert cascade(WORN, MAIL + TEAMS, BUGGY) == [] # In this toy, remove any one and every unit stays up. assert cascade(WORN, MAIL + TEAMS, FIXED) == WORN assert cascade(FULL, MAIL + TEAMS, BUGGY) == FULL assert cascade(WORN, MAIL, BUGGY) == WORN assert cascade(WORN, MAIL_OFFPEAK + TEAMS, BUGGY) == WORN You can check it by hand. With everything against you, total load is 850 and total capacity is 860, so a capacity dashboard says you fit. Split ten ways, each unit gets 85. A unit with eight servers holds 80, so seven units hang. The remaining three get about 283 each against a capacity of 100, and they go too.
Average headroom hid the weak units. That is a property of my toy, but the report points the same way. It names reduced capacity "in some capacity units" alongside the defect, the redirected Teams load and the peak. One of its planned fixes is detecting extended capacity loss that risks running out of headroom.
Separate pools and zones that don't spill
Two of Microsoft's listed next steps fit in the same file. One partitions gateway capacity into pools for different workloads (target: first quarter of 2027). The other fixes traffic distribution so failures can't cascade to other regions (target: fourth quarter of 2026).
# Two pools: the same 86 servers and load, split 8/2. assert cascade(WORN[:8], MAIL, BUGGY) == WORN[:8] assert cascade(WORN[8:], TEAMS, BUGGY) == [] def surviving(loads, units, limit, spill): load, up = dict(loads), set(loads) while up: down = {r for r in up if not cascade(units[r], load[r], limit)} if not down: break up -= down if spill and up: extra = sum(load[r] for r in down) / len(up) for r in up: load[r] += extra return up LOADS = {"na": 850, "eu": 600, "apac": 300} UNITS = {"na": WORN, "eu": FULL, "apac": FULL} assert surviving(LOADS, UNITS, BUGGY, spill=True) == set() assert surviving(LOADS, UNITS, BUGGY, spill=False) == { "eu", "apac"} Look at the pools first. Mail survives because 620 over eight units is 77.5, under the 80 a worn unit can hold. Teams dies, because 230 over two units is 115 against 100. In this toy, partitioning moved the failure onto Teams and left mail running. With other numbers, both pools could survive or both could fall. You pay for the split with idle capacity, and with a smaller failover target that may not hold the traffic you send it.
The regional version is starker. With spill on, North America's 850 splits across the other two. Europe goes from 600 to 1,025 against a capacity of 1,000 and falls. Asia Pacific then inherits everything. With spill off, North America is still down and two regions never notice.
Turning spill off permanently would hurt you on an ordinary day, when one region has a problem the others don't share. A cap on how much a region will accept from its neighbours sits between the two. Microsoft's report also lists a narrower fix: Teams should fail over only for the affected region.
Servers that die on rejoin
The report says the first recovery step was moving Teams, OneDrive, SharePoint and Office apps traffic to the other gateway. Exchange Online still didn't recover. My reading is that taking the extra load away doesn't clear a queue that has already formed.
The update that reverted the defect was first applied at 07:20 on November 13, fifteen hours in. Before that, restarted servers often went down again, because, in the report's words, they were "immediately overwhelmed by queuing client traffic". You can model that with waiting clients and a gate:
def rejoin(demand, total, cap, per_step, gated, steps=12): """Returns (connected, hangs) after `steps` steps.""" up = connected = hangs = 0 for _ in range(steps): up = min(total, up + per_step) waiting = demand - connected room = up * cap - connected admitted = min(waiting, room) if gated else waiting if admitted > room: up, connected, hangs = 0, 0, hangs + 1 else: connected += admitted return connected, hangs # One unit at a time, with everyone waiting at the door. assert rejoin(850, 10, 100, 1, gated=False) == (0, 12) # The same speed, with admission control. assert rejoin(850, 10, 100, 1, gated=True) == (850, 0) # No gate, but a large group returns together. assert rejoin(850, 10, 100, 8, gated=False) == (0, 12) assert rejoin(850, 10, 100, 9, gated=False) == (850, 0) Run python gateway.py. I haven't run it myself, so treat the asserts as claims to verify: if they all hold, it prints nothing.

Admission control makes some clients wait so the server survives long enough to serve any of them.
Without a gate, one unit meets 850 waiting clients, hangs, and the loop repeats for as long as you care to run it. Raising cap to 150, the patched value, doesn't save you at one unit per step either: 850 still swamps it.
The last two asserts bracket the other way out: eight units together still hang, nine hold. Microsoft's recovery shares one element with that, the batching. It moved large groups of capacity units out of rotation, recovered all the unresponsive servers in them concurrently, then returned the group. But those servers came back patched, after five steps each that included two restarts. Other services' traffic had been moved to the second gateway first, and the report's timeline has traffic being "gradually restored". So the report can't tell you how much the group size did by itself.
Gradual ramp-up and admission control on rejoin are on Microsoft's list with a date of "TBD". The idea is old. Google's SRE book chapter on cascading failures describes letting through about 1% of traffic when an entire service is crash-looping, once the trigger has been addressed, then ramping up gradually.
One caution before you copy the gate into middleware. In this incident, the overwhelmed part was the process that establishes connections. My reading is that a rate limiter running after the connection is set up would have arrived too late. The gate has to sit in front of the thing that hangs.
Two ports, two adapters, one connection pool
The design lesson fits in a code review. Teams and Exchange Online are separate products, and Microsoft runs two independent gateway systems built for isolation. After the failover they shared one of them, and the full cost of sharing only showed at peak.
Your Python service can do the same thing at a smaller scale. You define a Mailer port and a ChatNotifier port, the core knows nothing about either vendor, the tests pass on fakes. Then the composition root hands both adapters the same HTTP client with the same connection pool. Two adapters that share a connection pool share its failures. When a slow chat vendor holds every connection in that pool, mail waits too.
Three checks for your next review:
- Open the composition root and list every object passed to more than one adapter: HTTP clients, database pools, executors, semaphores. Each one is a shared fault zone. Keep it on purpose or split it.
- For every fallback path, ask what load it adds to the target at that target's peak. Microsoft's list includes failover testing that covers peak conditions, set against the finding that failover testing "did not identify the defect in isolation".
- Ask what is identical on both sides of the fallback. The same build on a second server protects you from broken hardware and does nothing for a bug in the build.
Retry limits, pool sizing and admission rules in your own service can live in functions like these three, which take plain numbers and touch no network. A test can then push them past the edge before your peak does.
If this was useful
That composition-root check is easier when you know where your core ends, what each adapter owns, and which object wires them together. Hexagonal Architecture in Python works through those boundaries in application code: one async FastAPI + SQLAlchemy 2 service built five ways (Hexagonal, Clean, Onion, layered, vertical slice), then measured. Every listing runs from the free companion repo, and the book is on Amazon.

