DevOps & tooling

What the Microsoft 365 outage taught me about retries

7 min read

When Outlook went quiet

On Thursday, 12 November, Outlook stopped opening mailboxes for a big part of the world. Teams and Copilot wobbled too, but email was the one that really went down, and it stayed down for most of a day. By Saturday morning Microsoft reported everything as restored.

I am not a Microsoft engineer and I have no inside view. But I followed the status updates and the reports closely, because almost every pattern in this story is something we also build, only smaller: gateways, health checks, retries, maintenance windows. So this post is two things. First, what is known so far. Then, what I took from it for my own PHP and TYPO3 work.

One honest note before we start: when I wrote this, Microsoft’s final post-incident report was not published yet. It was reportedly expected around 20 November. If it changes the picture, I will update this post.

What happened, as far as we know

Problems started in the late afternoon of 12 November (UTC). Microsoft first talked about users in the Americas who could not reach Exchange Online mailboxes, and soon after warned that any region could be affected. According to Al Jazeera, Downdetector had reports from 74 countries and territories within about an hour.

Recovery was slow. Microsoft brought servers back, saw partial recovery in some regions in the early hours of 13 November, and then had restored servers failing again. Around 16 hours in, the impact had narrowed mostly to Exchange. Mail queues were close to normal by the afternoon of 13 November, and full restoration was reported on the morning of 14 November.

The effects outside IT were real. Brazil’s Supreme Federal Court suspended procedural deadlines for the two days. Government departments in several countries were affected, UK schools reported disruption, and NHS staff in some places went back to paper. One story stayed in my head: at a hotel in Germany, alert emails about a chlorine dosing problem were sent through Outlook and never arrived. Five people were injured.

This was also not the first Microsoft 365 outage this year. In January, Microsoft 365 was down across North America for almost ten hours, and in late August many Outlook users were locked out of their mailboxes.

The cause, from the preliminary summary

Microsoft said early on that there was no sign of a cyberattack. On 16 November, Charles Lamanna, Microsoft’s EVP for Copilot, Agents and Platform, posted a root-cause summary on X. In my own words, it goes like this:

  • A defect that nobody had noticed made the networking gateway servers stop responding under certain load. At the worst point, more than 80 % of the servers hosting the gateway service were unresponsive.
  • The defect came with a change deployed in July 2026. Automated rollbacks only look at recent changes, so they could not help.
  • A change in how traffic was spread over the network fabric pushed more load onto the gateways, and maintenance on gateway hosts had taken 14 % of the fleet’s capacity out at the same time.
  • The isolation units (Microsoft calls them capacity units) did not contain the problem, so it spread across regions.
  • Teams, OneDrive and SharePoint could be moved to a secondary gateway group. Exchange Online could not, which is why email suffered the most.
  • When the fix went out, the waiting traffic hit the recovering servers all at once and knocked them over again.

That last point has a name: the thundering herd. Microsoft finally disabled automated traffic routing so the hosts could recover before they got requests again.

Lesson 1: retry, but with backoff and jitter

Every client that retries immediately is part of the herd. If thousands of apps reconnect at the same second, the server that just came back sees a wall of traffic and falls over. I have written plenty of “try three times in a loop” code in my life, honestly. It works fine until the day the other side is weak.

The fix is old and well documented: wait longer after each failure (exponential backoff), and add randomness so clients spread out (jitter). Here is a small PSR-18 wrapper I now use for outgoing calls from TYPO3 extensions. It works with the Guzzle client that TYPO3 already ships.

<?php

declare(strict_types=1);

use GuzzleHttpExceptionTransferException;
use PsrHttpClientClientInterface;
use PsrHttpMessageRequestInterface;
use PsrHttpMessageResponseInterface;

final class PatientClient
{
    public function __construct(
        private readonly ClientInterface $client,
        private readonly int $maxAttempts = 5,
        private readonly int $baseDelayMs = 200,
        private readonly int $maxDelayMs = 10_000,
    ) {}

    public function send(RequestInterface $request): ResponseInterface
    {
        for ($attempt = 1; ; $attempt++) {
            try {
                $response = $this->client->sendRequest($request);
                if ($response->getStatusCode() < 500 && $response->getStatusCode() !== 429) {
                    return $response;
                }
            } catch (TransferException $exception) {
                if ($attempt >= $this->maxAttempts) {
                    throw $exception;
                }
            }
            if ($attempt >= $this->maxAttempts) {
                return $response;
            }
            // Full jitter: sleep a random time between 0 and the exponential cap
            $cap = min($this->maxDelayMs, $this->baseDelayMs * 2 ** ($attempt - 1));
            usleep(random_int(0, $cap) * 1000);
        }
    }
}

Two details matter. It retries only on network errors, 5xx and 429, never on a 4xx that will fail again anyway. And the sleep is random between zero and the cap, the “full jitter” variant from the AWS article linked below. In a web request you should keep the attempts low, or better, push the call into a background job so no visitor waits for it.

Lesson 2: health checks can make it worse

Al Jazeera described how servers that failed health checks pushed their traffic onto other servers, which then also failed. That is a cascade, and a naive load balancer setup will do exactly this. If every node is at 90 % and one drops out, the rest go to 100 % and the next one drops out.

What I take from it for small setups: a health check should say “I can’t serve” only when the node really can’t, not when a slow dependency is slow. And when most of the pool is unhealthy, it is often better to keep sending traffic to everyone than to pile it on the last two survivors. Many load balancers have a setting for this (sometimes called fail open or panic mode). Worth checking yours.

Lesson 3: ramp traffic up slowly

A recovering node should not get full traffic in the first second. Let’s say a PHP backend behind a simple proxy has just restarted. It can answer a share of requests with 503 and a Retry-After header and grow that share over a few minutes:

<?php

// Let a host that just came back take only a share of the traffic,
// growing from 5 % to 100 % over ten minutes.
function acceptShare(int $healthySince, int $now, int $rampSeconds = 600): float
{
    $age = max(0, $now - $healthySince);
    return min(1.0, 0.05 + 0.95 * ($age / $rampSeconds));
}

$share = acceptShare($healthySince, time());
if (random_int(1, 1000) / 1000 > $share) {
    http_response_code(503);
    header('Retry-After: 5');
    exit;
}

This is a toy, of course. Real load balancers have slow start options built in, and that is where this belongs. But I like seeing the idea in ten lines, because then I remember to switch the option on.

Lesson 4: don’t send critical alerts through one provider

The hotel story is the one I keep thinking about. If an alert can hurt people when it doesn’t arrive, it needs a second path that does not share the same failure: an SMS gateway, a push service, a phone call, a siren. The same goes for our monitoring. If my uptime alerts go only to a mailbox at the provider that is down, I learn about the outage from a customer.

Lesson 5: plan the minimum viable service

One analyst quoted by Al Jazeera said organisations should plan for minimum viable services during global outages. I find this a useful question to ask a client before anything breaks: if email and chat are gone for a day, what still has to work, and how do people reach each other? Write the answer down, with phone numbers on paper. It sounds old-fashioned. It is old-fashioned, and it works.

For the sites I build, the honest answer is usually that the website itself keeps running, but every form that sends mail through a Microsoft 365 account quietly stops delivering. Storing form submissions in the database as well as mailing them (EXT:form can do both with its finishers) means nothing gets lost while mail is down.

Wrap-up

Nobody can promise zero outages, not even with Microsoft’s budget. What we can do is make sure our own code does not join the herd, and that the important things have a second way out. I added jittered backoff to two of my own HTTP clients this week. That’s a small step, but it is one.

Were you affected, and did anything in your setup save the day? Looking forward to your comments.

Further reading

Leave a comment

Your email address will not be published.