← Back
IAmTimCorey November 25, 2026 24m

337. Lessons Learned From The Microsoft Outlook Outage

Read full transcript 22 segments
  1. On Thursday, November 12th, Outlook went down. For almost a full day, most of Microsoft 365 users couldn't get access to their email. Businesses schools governments and hospitals all felt it. I felt it. When Microsoft published what went wrong, the cause wasn't a hacker, it wasn't AI, it wasn't a bad deployment that morning. It was a change that had been running quietly since July. So how does a change that worked for 3 months take down the email for practically the whole world? And more importantly, what can we learn about it before it happens in our apps? Let's talk about it in today's episode of Dev Questions. Software development is more than just writing code. So let's talk about the rest of it. Specifically, let's talk about the lessons developers can learn from the Outlook outage. And I'm calling it the Outlook outage. Technically, it's an exchange outage or a Microsoft 365 or M's 365 outage. We're just going to call it Outlook outage to be clear. And let's start with some fairness to Microsoft. Even large systems fail eventually. Microsoft runs one of the largest email systems in the world as we saw by the outrage and also the the joy at not having to do any work on Thursday.

  2. And they did publish a report that included what happened, what they fixed, and when, which is the right thing to do. It's an admirable thing to do to say this is what happened. We're being very clear about that. And that's something we can also learn from. To be clear, I'm not here to dunk on Microsoft. Their engineers had a very long day, a long night, and another long day afterwards. And I'm sure they're still facing the repercussions of that outage. My goal here is to make sure that your that my apps don't repeat these same mistakes. As when I was raising my my boys, I used to tell them, you can either learn from my mistakes or you can repeat them yourself in order to learn. The first way is a whole lot easier. And the same thing is true here. We want to learn from somebody else's mistakes instead of doing it ourselves. So let's start a quick recap of what happened. Back in July, a Windows change on the gateway servers that sit in front of Microsoft 365 products um had an was put in place. So there was a a change that happened and they put that in place. They tested it.

  3. They went through a whole bunch of tests. It worked. They put it in production. It worked. And they had been running on that for three months with no issues. Now next what happened was there was a routing problem in one of the [clears throat] regions um and so they moved all teams traffic, all the worldwide teams traffic into the gateway that exchange users also use. So this is common. There's a couple different gateways they can use and because the one gateway had a problem, they moved all teams users over to the same one that exchange uses. So this happens. It was about 15 hours earlier than this outage. So it's not like it was an immediate, oh, that's the problem um because that wasn't even the problem. It was just part of the contributing factor. And uh the third thing that kind of was lined up with this is that about 14% of the gateway servers were down for routine maintenance. This is normal.

  4. This is what happens. They have the overhead to handle that. And when you're doing maintenance, you want to do maintenance on servers that are not actively bringing customer data through. So this is very common. So what happened next was the US business day hit and that's when peak traffic happens, when you open your email client and you start downloading new email, you start, you know, sending new emails, responding to emails, etc. So all those things all combined into one soup of a problem and they triggered a hidden bug in the server. And what happened was because of all this stuff happening at once the these servers, which were very powerful actually that was a problem because that power allowed them to do more and it started them locking up and they had a CPU and memory exhaustion issue. And what happened then was that when a server you know went through this event and went oh no, I am overloaded, I'm swamped, I have a problem, I have no more resources.

  5. Well, they have health checks and those health checks said hey this server is in trouble. So let's fail over to a different server, which is the normal process for high availability. The problem is is that all that traffic then went to another server which got overloaded and then crashed and then sent that to another server. And so what happened it kind of spread like a virus because the fact there was no virus by the way, but it spread like a virus because it kept filling up a server, locking it up and then passing that down to the next server in line because the traffic has to go somewhere. So this is a little bit like how the Titanic sunk where they had partitions, but they didn't go all the way to the top of the ship. And so what happened is as the water got in the bow, it started to sink a little bit and that water then sloshed over the partition to the next one and started filling up. Kind of like an ice cube tray.

  6. This is what happened. They started fill up a server, crashed it and moved on that moved that traffic to the next one. So traffic moved from healthy servers and into healthy servers and then took them down and spread to every region across the globe. At one point, I think it was 8% of the world's population of Exchange servers from Microsoft were unresponsive. So now Teams, SharePoint, and OneDrive were able to move to the backup gateway. They have multiple gateways they can they can move to. Unfortunately, Exchange is too big, which if you see the comparison there, Teams, SharePoint, and OneDrive are smaller than Exchange. Exchange is too big to move. So it can't move off the current gateway it's on. Therefore, it took the hit. So all the rest of the the you know, Teams and SharePoint OneDrive, they could continue to work if they have failover gateway they can go to.

  7. But Exchange couldn't. And so for about 24 hours, Exchange was just getting pummeled and was down. Now the the good news here I want to point out, no email was lost or seemingly no email was lost. They had queues for about 48 hours worth of email. So they were able to like queue those up, which kind of leads to the next problem, which was when they brought things back up. And we'll talk about that in a minute. So let's talk about lessons we can learn from this because this is Microsoft. This is one of the largest traffic systems that there is in the world. And so probably your app that's serving eight people right now won't experience these same issues. But as your apps grow, as you work for a business that does have some similar issues, you need to start thinking about how do we think about building our apps? How do you think about deploying our apps? How do you think about making sure that we have high availability and what do we do when things go wrong?

  8. And this scales from a tiny app all the way up to massive apps. So number one, rollback has an expiration One of the things that Microsoft wanted to do and they could not do was just roll back the problem. See, if they if they deployed a a patch or a an update that caused a problem, they could say, oh, whoops, roll that back, roll that back. And they would have been able to roll back those changes. But the problem was the change didn't happen yesterday at 8:04 from the standpoint of this downtime. It happened 3 months earlier. So they'd had 3 months of updates and fixes and changes and tweaks that maybe even changed the original issue or original code. So you can't just say, well, pull that code out because it's obviously changed since then. So there isn't exactly a easy rollback. And that's something to think about is don't just have a strategy of, well, we'll roll it back if there's a problem because as we saw in this case, it went through all of Microsoft's rigorous, and it is really rigorous, testing process to get in a production and it passed. And then it passed 3 months of production use.

  9. So it's not like you can just depend on, oh, well, you know, we'll know right away if a patch is bad. I do want to point out as well that rollback is not always an option because of the fact that some things can't be rolled back. Even, you know, in entity framework you can see well we have a a migrate up and a migrate down in case you want to roll back a change. It's not quite that way because once you put something in a production, let's say you add a new field where you're saying, you know, we're going to capture middle name, not just first and last name. Well, you now have that new middle name. If you put that in a production, people are going to start populating that with data. How do you roll that back? You delete the column and all the data you've captured so far? That's probably not the right solution, especially since that 's the easiest of the data change uh potentials. if you have other things that change how big a field is. Maybe you said, hey, our our last name field used to be 20 characters, want to make it 30. Well, what happens when people take advantage of that and then you try and roll it back? Do you truncate last names?

  10. Rolling back is not as simple as just, oh, let's undo what we just did. Sometimes there is no going back with a rollback. So you have to remember that when you're planning out, what do we do? Uh number two, test on the hardware you actually run on. Now, Microsoft, what they did was they load tested using older machines. So older machines, fewer cores, um because the thought process is, well, if that can sustain, let's just throw random numbers here, but if that could sustain 1,000 people on this server, it's an older server with less cores, then a server that's newer that has more cores and more more uh throughput that can handle more, so it can at least handle that 10,000 or 1,000, whatever you wanted to to do. The problem is is that this bug actually got worse when there was more cores. The slower machines weren't actually the problem. The faster machines were the ones that exacerbated the problem and caused more issues. So if you're testing on slow machines, that's great for finding speed problems, but speed problems aren't your only issue. Sometimes it's contention problems.

  11. So now Microsoft is actually testing on its latest hardware at peak load, not just on old hardware. Number three, plan the comeback, not just the failure. Part of the problem Microsoft had was they found the problem and they said, okay, here's a potential fix. They put the fix in place. Actually had to reboot the servers twice to do this. And then they brought a server back up with the fix and it got overloaded immediately because of the fact that there's massive backlog of people waiting and emails waiting to be processed. And so that would crash that server. And so they'd have to, you know, bring the next one back up. And it it made for a really messy process. So they had to figure out how to bring up servers, but not overload them. So this is something that they had to work through on the fly. It was not something they necessarily had a good plan in place for. So even their fixes, they had a fix, they couldn't just put it in place because when you have, again, let's just throw numbers out. If you have a load of this is going to max out 100 servers.

  12. And you bring on one server at a time, it's not going to work. You bring on 10 servers at a time, it's not going to work. Because what happens is you have 10 time even at 10 server, you have 10 times the traffic per server that it can handle. And so that's just going to bring everything to a to a halt again. And so you had to figure out how to throttle that traffic. So even though they had this massive queue of traffic, they said, okay, but only allow a little bit to come through at a time in order to not overload these servers. And part of this was that they have automatic health checks in place, which are great. The problem is is that when you swamp a server, that health check goes goes bad. It says you're unhealthy. Which then takes that server out of the system. And it's supposed to bring the next one on, but they don't have a next one to bring on because they're still bringing things back up. So plan for your comeback, not just a figure. Figure out how to make sure you have a throttle in place to not overload your servers.

  13. Number four, your safety features need testing, too. So this failure caused a failover that spread to the next machine. And the load caused that machine to also fail and the next one and the next one. You need to practice that. You need to figure out what's going to happen. If we have too high of a load, maybe it's a Black Friday sale or maybe it's you know, if you're a a college, the new students coming on campus all at once trying to look at their class schedules. Whatever the case may be, if you have a high load all at once, do you have enough resources to handle that? And what happens if you have a server that for whatever reason glitches out or can't can't work? And all of a sudden there's even more load on the rest of your servers. Can they handle that extra load? And what happens if one of them fails? Does it put even more load on the other ones and cascade through? Is there a way to have a safety valve there? You need to test these safety features before you have problems.

  14. Uh number five, small problems stack up. Too often people want to hear the one big solution. Was it, you know, was it AI attacking Microsoft? Was it, you know, a virus attack? Was it hackers? Usually in real world problems, it's not this one big issue. It's a lot of little things that come together at the right time. The if you want to call the one big issue was that patch back in July. But as we have heard and have seen, that patch worked for three months. So it's not like it's just that patch. It was the failover, it was the routine maintenance, it was the peak traffic, it was an old bug. Each of them on their own was fine actually. But it's when you combine all that once, kind of the the perfect storm that you get issues. This is what happens almost always in development in in deploying your apps is that you don't find it's just, oh that's the bug. It's more like, well here's a cascade of issues that caused this. I need to work through how do we fix the cascade? How do we fix all the different issues that kind of add up to one big issue?

  15. Number six, stop changing things during an incident. This hopefully is a no-brainer, but when you have a an incident, you probably already have a pipeline for deployments, configuration changes. Don't do those. Put a in everything. Make sure you don't add new unknowns to an existing problem. Try to make sure that you only deploy things that are working to fix the actual problem. Otherwise, you might cause new problems and not realize it. And so now you have additional things and it's just too many things changing at once. Number seven, make sure that you're monitoring your systems. Microsoft kind of had a 20-minute delay in letting people know there is a problem, even though their monitor flagged the issue 30 minutes before the first support case came in. So they need to watch their monitors better and not just look at support cases for issues. So make sure you're paying attention to those monitors. We talked a few episodes ago about logging and about how don't log it if you're not going to listen to it. Don't log it if you're not going to use it. And by use it, I don't mean, well, someday you might look through the logs to see if there's a problem. No, no.

  16. Continually using it. Like if you're not every day looking at all the log statements, then why are you actually doing all that logging? Because what happens is it causes so much noise you don't listen to anything and you miss the issues. Number eight, communicate early and often. People want to know what's going on, what do you know, what do you not know. And it's really important to tell your customers what's going on because when customers don't know, they don't know if it's their issue or your issue. They don't know what to do and that can be very, very frustrating. So letting them know we're working on it, here's what we know, here's what we're doing. And for example, a big one that people want to know was, are my emails lost? Am I losing all these emails because I'm receiving emails from people, but if I if they don't actually get to my inbox and they get destroyed, like that's that's a problem. So Microsoft was clear on that that, hey, we have your emails. They will be safe.

  17. They will be in your inbox once we get the your inbox is up and running. Uh we have 48 hours of queuing. So that was really important to tell people so they could at least relax knowing that, you know, yeah, we don't have Outlook today and that's kind of a little bit of a vacation for some corporate workers. Um but when it comes back, we'll have all those emails back, you know, coming from the start of this incident. So all of that, what does this mean for developers today? Um testing. Testing only proves what you thought to test. Um this is one that especially the AI today um people are getting more and more um lax and about. We have tons of tests. AI has written a thousand tests for me. Doesn't matter. Um this this bug passed all the tests. And it was passed three months of production, which is its own kind of test. So testing, you need to make sure that you're putting in place good testing and thinking through all the possibilities and don't just think because we thought through all the possibilities or how the AI think through all the possibilities that somehow magically fixed.

  18. Um number two, AI won't save you. AI won't save you. Um this is not was not caused by AI, but Microsoft did one of the biggest proponents of AI helping write software, AI helping you diagnose problems, AI fixing problem. This is not something that they could just point Copilot at and say, hey, fix that um because it took a it was a whole lot more comprehensive. It may have helped. It may have assisted them. It may have given them places to look and review logs and other things and help them be faster, but it doesn't know your hardware, your traffic, your failover plan. It And even if it does know all those things, it doesn't actually work like a human. And so um you need a lot more um help in this from actual humans that know the system, which is also kind of important um again in the in the days where AI AI wrote the thing, you know, do you actually know your system and how it actually works?

  19. Because if you don't, it's going to be a whole lot harder to actually debug things when things inevitably go wrong. I'll have a video coming up um probably a a dev question video coming up um in a about a month or so where we're going to talk about uh the state of of software development. One of the things we're going to talk about is the fact that yes, software developers are using AI a lot, but that actually increases the issues. It does not decrease the issues even in 2026. So knowing how your system works is really important. Companies are starting to hire more and more senior developers because they're they're looking for people who can actually understand a system and understand how it works so that it goes wrong, they know how to fix it. It's not just a point the AI at it. Okay, number three, ask the scale questions early. So understanding what you need to do to scale up and scale out and understanding, you know, what happens when these things happen? What happens if everyone reconnects it once after you're down for an hour or for a day? Um what happens when you have peak traffic times?

  20. Can we handle this? What if we're currently doing maintenance on 14% of our servers? Can we still have peak traffic times? What if we have a different failover somewhere else? Can we still handle this? So ask your scaling questions early and test your assumptions. And then number four, this is so important, write down your recovery plan before you need it. So who does what in what order? How do you bring it back slowly? What are all the passwords or IP addresses or everything you need should be written down somewhere very clearly because when you are in the midst of it and it's never going to be at a convenient time. But when you're in the midst of it and you're, you know, panicking and trying to figure out what's happening, our whole system is down, and it's Black Friday, we need to get this thing up now, now, now, and you have a vice president or the president, you know, in your ear going, what's happening? Why, why, why?

  21. This is not the time to go, what was that IP address again? What should we do next? Like you want a game plan that you open up the manual and say, step one, step two, step three, step four, here's all the information, here's how we do it. Have that recovery plan set in place and tested before you need it. You don't want to try and invent this plan at 2:00 in the morning on a Saturday. You want to be doing this when you have time, when you can review it, when you can practice it, and make sure it's right. That way you can just execute when the time comes. The bottom line is this, there is no single safety net. None of them are good enough. Rollbacks aren't going to help when a bug is has been alive for months. A load test won't help if it's not running the hardware you're deploying to. Failover won't help if nobody planned for what happens when everything come back online at once. So with all of that, look at your own apps this week.

  22. Ask how you fix a change from 3 months ago. Ask what hardware tests run and what happens whenever a user reconnects at the same time. Plan for the comeback, not just the crash. All right? Thanks for watching. Thanks for listening. And as always, I am Tim Corey. >> [music]

No summary available yet.

View original episode ↗