SPEAKER_03

It's funny because it was almost like a sixth sense. I saw that there had just ticked in an alert from I think it was Basecam Emergency, sorry, the bat signal that we use that goes over text message. Like a couple of minutes before that, I was like, mmm, I haven't seen one of these in a long time.

SPEAKER_04

You walk in and you go, wow, this is a significant problem.

SPEAKER_01

I was like, oh shit.

SPEAKER_00

Like, what the fuck is going on? On Thursday, November 8th, Basecamp 3, a piece of software that is made and maintained right here at our company, went down for almost five hours. For all that time, the app was in read-only mode, which meant customers could read messages and files, but they couldn't add anything or make edits in their accounts.

SPEAKER_02

This was the worst outage at Basecamp in about a decade. Before November 8th, our uptime for Basecamp 3 was 99.998%. That's a lot of nines, and that's the way we like it around here. Today we're devoting the entire episode to what happened inside the company during the outage, almost like a mini handbook on crisis management. Here's Basecamp co-founder and chief technology officer David Heinemeier Hansen.

SPEAKER_03

We have such a boring software life in that regard that it's not all exploding cars and drama every five minutes. It's a lot more mundane than that. And the vast majority of times, even if we have small blips or issues, there are small blips and issues. And we have a wonderful operations team that deals with all this stuff. So I really very rarely have ever get to see any of the mechanics of it because it just kind of hums along.

SPEAKER_00

We've been talking a lot on this show about creating a calm work environment. David and CEO Jason Fried just released a new book on this topic, and they take a lot of satisfaction in running a calm company. The big outage on November 8th put Basecamp's culture to the test. It all started early that morning when a few folks on Basecamp's ops team noticed something was amiss.

SPEAKER_04

I think the day began with me getting paged that there was a problem and that they needed help. My name's Taylor Wibely, and I'm the head of technical operations here at Basecamp. If a site is totally down, everyone on our team is gonna get paged. So all seven of us will get an emergency text and it will call you too to make sure that the SMS message reached you.

SPEAKER_03

I saw that message and I was waking up with my son in the morning and was like, shit, my wife wasn't even awake yet. I was like, eh, I'm just gonna put you in front of the TV and give you a couple of yogurt tubes, and then daddy's gonna go to the office for a little bit.

SPEAKER_00

That's David, Basecamp CTO. By the time he arrived to pitch in, Taylor's team had already diagnosed the problem. We're gonna get technical for a minute. Basecamp has a big old database. That database has multiple tables. One of them, the events table, tracks almost every single activity that happens in Basecamp 3. A new row gets inserted into the table when someone posts a message or updates a to-do list. That table also has a column called the ID column that's configured in a certain way. In this case, as an integer, meaning it could accommodate a finite number of rows. This is where Basecamp ran into trouble. Once the table maxed out that number of rows, new events could no longer be written to the table. That meant if you were using Basecamp 3, you couldn't post a new message or chat in campfire. So what was this maximum number of rows that Basecamp hit on November 8th? I asked Taylor to do the honors. That's more than 2.1 billion. We needed more rows. And there's a column type called Big Integer, which allows more numbers. How many more?

SPEAKER_04

You can go to 922 337203685477507, which is a lot more numbers.

SPEAKER_00

For those of you playing at home, that's over nine quintillion. Taylor's team was able to diagnose within eight minutes that there was a maxed-out table and that the column type needed to be changed from integer to big integer. That was the good news that they identified the issue so quickly. The bad news? A couple of things. First, there was the immediate frustration that this problem was totally preventable. It had already been flagged as an issue several years ago for Ruby on Rails, the framework that powers Basecamp, the framework that David invented.

SPEAKER_03

Like I wanted it to be something spectacular, something like rare and mysterious, and like aliens had hacked into something and they had encoded it into like this foreign language and we had to decrypt it with like all sorts of running graphics going on, like I got this, we're gonna get it. But it wasn't that dramatic. It was so much more mundane. And not only was it mundane in the fact that the issue was known, known ahead of time, we were already on it. And we just we had either not calculated or not calculated correctly how much time we had left. It was kind of like you're diffusing this bomb and you're like, all right, let's let's just take a coffee break, and like there was 30 seconds left on the clock. And no, it's not the time for the coffee break, right? That's also I mean, in some ways it's just the ultimate humbling experience that it's such a rookie mistake, and it evaded not only me, but the rest of our very diligent, experienced, and competent organization. That that's just uh right? You go like, man, that uh that didn't need to happen.

SPEAKER_00

That was the first kick in the stomach. And there was something else.

SPEAKER_03

I think it took like eight minutes perhaps to diagnose exactly what the problem was, then a few more minutes to figure out what the fix was, and then a bit more than that to test the fix. And then quite quickly we were running to fix. The problem was that the fix took like three hours to run.

SPEAKER_01

I'm Kristen. I run the support team at Basecamp. There's a huge difference between 10 minutes downtime where you can like go get a coffee, go chat with your neighbor, whatever. And three hours, which is like I need to restructure my day. I grabbed my computer, logged on, made some coffee, and just jumped into the mess.

SPEAKER_00

Since Basecamp customers would be facing this huge amount of downtime, it became really important to keep them in the loop.

SPEAKER_03

I started just running communications on the public side of it, in terms of taking over Twitter, our status uh blog, and quickly started posting to a SVN article, basically just keeping a timeline such that people who were just joining the fun could catch up and see exactly how far along we were. I wanted to make sure that we had an update every 30 minutes to reassure all the customers that we were absolutely on it. A lot of it just runs off. What would I want to know? If I was a customer at Basecamp, how would I want to be reassured? Would I want like a very corporate, vague language? Or would I want a human on the other side that just spoke the truth and told me it straight up, even if it was not flattering what was being told. So I try to just write in that tone. Just like I write software, just like we write anything, just like we write the interface. Like we're humans and we're talking to other humans. And it doesn't have to go through this weird, garbly corporate translator where what comes out on the other side just sounds like this, like, uh actually what happened? I just I was very intent from the beginning to just own it. We fucked up. And we're gonna tell people we fucked up. And we're gonna ask for their forgiveness, and we're gonna say we're sorry, and we're gonna mean it.

SPEAKER_01

What I'm thinking about is more how we can be as clear as possible that we know there's an issue, that it's not the customer's fault that their data is safe, and that we are working as hard as we can to get the app up as soon as possible. And if we have a timeline to share it with them, but also sharing caveats that you know we're making an estimate that the estimate could be wrong. And if they ask what exactly is going on, we can give them a more technical explanation. But I I don't want people to get caught up in a technical explanation that would just end up confusing them. There's a risk there that you're only giving them this explanation so that they don't ask you any more questions, right? You're sort of shutting down the conversation by being overly technical.

SPEAKER_00

For the ops and programming teams, those two to three hours of wait time weren't just about watching a proverbial status bar crawl across a screen. Although there was a little bit of that too.

SPEAKER_03

The main part of it was that we had to make that change to the database. It was going to take a long time because it was a huge table. And we had to wait some of that out. But there was still a lot of activity that could happen at the same time and did happen at the same time.

SPEAKER_04

My first role was to make sure that we were clear about who owned investigating the problem at that moment, who was gonna make sure that we alerted other people in the company, who was gonna update the status site to let our customers know, who was keeping our support team in the loop. We need to actually take concrete action here to get other people involved, um, and then to make sure that they understand clearly what you're asking them to do. You know, Basecamp operates a ton of applications. My team is responsible for those, but there are people in our company who have more or less knowledge about each of those applications. And so one of the things that you want to do is you want to bring in the people with the most expertise and say, hey, look, here's what we think is going on. Is there anything else we need to consider here? Is if we make this change, is it gonna make things worse in some way that we don't expect, right?

SPEAKER_05

I'm Jeremy Dare. I'm on the security infrastructure and performance team at Basecamp. I got kind of a strange wake-up, because this was at, I don't know, five something my time. I thought I was getting an alarm because my phone was making a weird noise, and it wasn't an alarm-like noise, so it kind of leaked into my dream. And then when I woke up and I looked at my phone and realized I could I wasn't turning off the alarm, I was getting a call from Taylor. Either Taylor just found on some awesome deal online needed to let me know about, or there's actually a huge emergency. So it it got whatever my brainstem going immediately, like, oh geez, totally awake. And so my brain just immediately starts worrying to like, what can we do with a maxed-out table? And then there's like a whole ripple effect of consequences and possible fixes.

SPEAKER_04

There's eight database servers that power Basecamp 3. There's two data centers. We're using cloud services. We're operating, you know, uh 10 gig uh private interconnects across cities and stuff. There's there's a lot of things that can just break in weird ways.

SPEAKER_00

Taylor and Jeremy's teams use staging or non-production environments to try out different scenarios. These are systems that are used for testing, so you don't mess with anything live. They landed on effects and put it in motion. This is what was estimated to take two to three hours, but there was another wrinkle.

SPEAKER_05

Technically speaking, we run a primary database, which we write to, and we have a bunch of replica databases that we read from. And in order to do a big change like this without affecting the primary database, we do it, we perform it on one of the replicas. And we take the replica out of service, we make the change, which blocks access to the table, and then we put the replica back into service, and then we swap roles. So we make the replica the primary and we turn the primary into a replica. But when we did the database migration to allow the database table to grow larger, to remove the cap, at first it didn't work. And so that was our our moment of truth and really the most stressful part of this whole experience, because it was no longer a hurry up and wait situation. It was a we've built up to this moment where we've given customers a rough sense of this is when we're probably going to come back online, and now we had an actual new crisis of, well, everything we've said, everything we've thought about this might not pan out.

SPEAKER_00

The team had to quickly but carefully consider their options, which were both pretty awful. Either have Basecamp 3 go completely down, even worse than read-only, or lose the most recent two to three hours worth of customer data. As Taylor was leading the discussion around what to do next, Jeremy and his team were doing further investigations.

SPEAKER_05

In the background, we were looking at why isn't it working? Why can't the primary database send this data to the replica and have it catch up? And so we had some sense of this should be possible. And so went digging around and found that the replica database could take all those two to three hours of updates to the primary database and apply them to the replica. But it needed to be configured to do so, as by default it wasn't-it didn't allow it. So it's something that we could turn on in that moment of realizing like we can turn this on. Our version of the database does support this. We just tested it in a staging database and it works. It's just the moment of like enormous relief. We've just averted this like impossible decision.

SPEAKER_00

By 1241 p.m. Central Time, B scam 3 was back up and running. It had been just over five hours. During that time, Kristen and the support team fielded 1800 emails. That's almost as many as they would normally get in an entire week.

SPEAKER_01

Aaron Powell The 1800 people who wrote in that day, we had to then write them again and tell them that everything is working again. That took a while, and that was sort of like everybody's just going into the queue and doing as many as they can. Because we want people to know that it's working. We don't want to just like silently fail and silently succeed. We want to be proactive and be like, hey, you wrote in about this. It's working again. Thank you, sorry. Everyone was so nice. It was amazing. I my expectation, I guess, was that people would be angry and upset. And they weren't at all. People were tweeting at us, telling us to take care of ourselves. They were sending us like all sorts of sympathy and compassion. And I think that there's a couple things that that happened. The first one is that we we haven't had such a catastrophic downtime in the time that I've worked at Basecamp, which is coming on eight years now. So we've built up all this trust. Like they know this doesn't happen with regularity. And then the other thing is that what my team does is remind everybody that we're a group of humans who work at Basecamp. You know, you'll email a company and they'll send you an automatic reply back right away that says, like, hey, we got your email, you're really important to us. It's gonna take us two to four business days to get back to you. And so we don't send anything like that out, but you always get a human being responding to you within an hour, mostly 30 minutes, a lot of times 10 minutes. And so we've built up a lot of trust with people, and they know that we're human beings or answering these emails. We don't have anything in place that sort of shuts the door in people's faces. And so I think because of that, everyone was like, oh no, their support team is probably dealing with so much, their ops team is probably really stressed out. So everybody was just encouraging us, and it was really amazing.

SPEAKER_00

On a previous episode of this show, David talked about a customer support framework that uses tokens as a metaphor. When something happens, you can either grab the token that says, this is no big deal, or you can grab the token that says, this is the biggest deal. Whichever one you grab, the customer will grab the other one. On the day of the outage, David went for the big deal token right away.

SPEAKER_03

Capitulate early and completely. I think that was basically the answer. Because that was really what was warranted, right? Like no one else did this to us. We did this to us. Just own it and own it completely. Because if you're gonna own it anyway, why not just own it all the way? Why these caveats? Is anyone gonna feel better about you because you're trying to weasel your way around the edges? No, they're not. I think by and large, the response to that was exactly what the token strategy tells you will happen. If you take this is the end of the world, people will line up to tell you, no, no, no, it's not the end of the world. It's annoying or it's frustrating or whatever, but it's not the end of the world. And they will feel better about being given the chance to be gracious.

SPEAKER_01

I didn't give very many credits. I give a few. Less than a thousand dollars. People weren't asking for credits. There were a few people who wrote in who had it was really bad timing for Basecamp to go down. This one person who wrote in was like, I uh I'm the Basecamp champion. I've been trying to get my company to use this app for months. Today is the training I was gonna give for everybody. I've already gotten pushback about this for so long. And today was a training, and I was like, oh fuck. Like this person has been trying to use this app. And now we go down, like, and nobody wants to use it. So, of course, I gave them an extended trial, um, and I ended up sending a basket of Zingermans to their office.

SPEAKER_00

There was only one extremely upset customer, a large organization that relies on Basecamp to store time-sensitive information that they needed full access to on that Thursday.

SPEAKER_01

They were not happy, and that was the only person I was like, Jason, you can you can handle this person.

SPEAKER_00

That's Jason Freed, Basecamp CEO.

SPEAKER_01

To be fair and transparent, Jason was answering emails. Jason was answering emails just like everybody else was during the downtime. The thing is, like, the way that we have it set up, we we didn't even need that much help. People wanted the help. We didn't feel ever like we were drowning. We were really busy, and it was hard to take a break, to feel like you could take a break, but that's why we have to remind each other that it's okay to get up and it's okay that the email sit for a little while. But we're set up in a way so that even if something like this happens, we don't need to ask anybody else for help. We have it under control. The people who were helping wanted to help, they wanted to feel useful because that's part of the culture at Basecamp is that they they don't want to just sit around and have a day off and they know that the rest of the company is a little stressed and panicky. A bunch of people asked if they could help, and you know, we said they didn't have to, and they did it anyway because they're wonderful.

SPEAKER_05

It feels good. It feels like working as a team and particularly noting like organizationally not feeling like a lot of internal stresses or pressures, like kind of sheer forces within the organization as one person's requesting something from another team. Everybody's working together, and internal communications um are smooth. And these are the kind of things where it's hard as a company that doesn't do these things or doesn't practice them to uh to even know to do. Because you need to have crises and uh to know that these are things you need to work on. And so when we have a calm experience like this, um I try to figure out like why, what's going on there. And part of it is like it's that it's a known unknown, and so there was a lot of hurry up and wait. But a lot of it's just competence and expertise and trust. Of our trust batteries with each other are very full. We're all doing what we can. We're leaving space for other people to do uh to fill their incident responder role. Um yeah, just it felt great. So it's it's a a really mixed kind of feeling of this is something we never want to happen, but it's also a time where we can be as proud of Basecamp like as a as a team.

SPEAKER_00

It's worth noting that even on the day when Basecamp had its worst outage in a decade, people didn't work extra hours. Kristen logged off at her usual time. Jeremy still did a one-on-one with a colleague that he had previously scheduled and signed off early. Here's Taylor.

SPEAKER_04

If I'm like guys, the sky's falling, we're all gonna be out of a job, Basecamp's gonna sink today. Well, guess what? Everybody is just gonna act in that way. If instead I say, hey, this is an opportunity for us to do our best work right now, to be cool, calm, collected, then then that's how I need to act too, right? To to model that to everybody else. Actually, like I will literally prompt everybody and say, hey, now's a good time for you to go take a break. You know, nothing is so dire that that we need to kill ourselves, right? It's just not that's not a good thing. Just like getting a good night's sleep every night is important. Taking those breaks is is equally important, especially when you know it's gonna be a long timeline. It's one thing if it's a 20-minute fix. When you're looking at a couple hours, it's like people need to be doing sustainable work here, not running a sprint.

SPEAKER_00

There was plenty of time in the aftermath for postmortems and discussions of what to do next. We changed some of our emergency notification protocols and talked about expanding crisis drills from the support and ops teams to the entire company. And throughout the experience, there was great care to avoid pointing fingers. When David said he capitulated early and completely, he also meant that internally he took the blame.

SPEAKER_03

I remember just a couple of times I would start a sentence where I'd go like basically how did the fuck does this happen? And I would just I would kind of like I would bite it every time because I'm like it's just not important right now. It's not helpful. No one was egregiously negligent. Um we made mistakes. Some of those mistakes were kind of rookie mistakes. But that's also what happens. And we should have had a better framework, we should have had better controls, we should have had all sorts of things that at the end leads to my desk. Like I set up the environment, I set up the frames for it. So when people make mistakes within those frames, I mean that's on me, at least in large parts, right? And if we're not actually going to fire people, which we're not, by the way, just making that clear. Um because no one was gross and neglect negligent, the opposite was true. Um everyone really rose to the occasion after the mistake had uh been identified, then what good is it? What good is it to run around and sort of walk on eggshells and like try to um excuse or defend or deflect let's just get to the facts of what happened within the security that like you're not getting fired. We just want to get to the bottom of it. It's not all your fault. Maybe there's some of it that's your fault, and maybe some of that drives people to be even more diligent, and and that's fair, but there's also a lot of it that wasn't your fault. Um and it's not on you, and and no single individual beyond perhaps me needs to to carry that. Because I carry it the easiest. Who's gonna fire me? Jason's gonna fire me. Actually, I mean, I suppose he could. He could we could blow up the whole company if I was proven to have been gross negligent and like willfully trying to blow shit up. But um I mean that's not what happened.

SPEAKER_00

What David taking the lion's share of the blame does is allow everyone else to focus their effort on the more productive work of preventing another outage. And that's a real cost Basecamp will have to grapple with because it means diverting attention and resources from other projects. But it's what needs to be done, even if the result of that work goes totally unnoticed by customers.

SPEAKER_04

People used to say, you know, well, being on being to SRE or uh site reliability engineering or being on ops or whatever is like being a firefighter. Like that is kind of true. So like there are times when there's a fire and someone dials 911 and they say, Hey, you know, there's a fire. I need you just in the fire department. There's also times when um the fire inspector goes to a building and says, Hey, the things you have don't meet the code, right? You haven't done the requisite work to prevent a fire. And so a lot of our work is looking forward for things that might happen, and then looking at how we can make sure they don't or make sure they happen in a way that we intend for them to. You know, that's often missed because you you have like a big event and this gets a ton of publicity and it feels really bad, even if you restore the service. And then you kind of are so quick to say, well, hey, what about the other, you know, 10 months of the year where nothing happened? Or maybe something did happen, but the customers never knew, right? They didn't, there was no data loss, there was nothing, you know, no interruption to them, et cetera, et cetera. Like it the thing in the industry is like make things reliable, make them available, right? And there's always trade-offs in those. And for us at Basecamp, like we're a seven-person team. There's a there's a limit to what you can do with with seven people. Um, and and we just have to be real with ourselves about that. And I think, you know, I I I even tell myself that personally, like the idea that I can be perfectly prepared, you know, is is pretty foolish. So you just you gotta you gotta wrestle with that and say, hey, so it goes sometimes, and then the other times you just do a great job, and and you know, the satisfaction of nothing happening has to feel really good.

SPEAKER_01

This feeling that I've been trying to write about, and it's really hard to synthesize it. On the Friday after, the next day, a few of us were on a hangout that we had already scheduled, and we were all talking about what happened. And the one thing that we talked about a lot was this really strange feeling that we decided there must be a German word for that we don't know about feeling really good despite a bad thing happening. So we were all really proud of ourselves and we handled it with with grace and were organized, and nobody lost a shit. And so we walked away from that feeling really good, even though it was about a bad thing.

SPEAKER_02

Rework is produced by Weyland Wong and me, Sean Hildner. Our theme music is broken by design by clip art.

SPEAKER_00

You can find show notes for this episode and every episode at rework.fm. For this episode, we will put up links to the signal versus noise posts where David was keeping everyone updated on the day of the outage. So if you want to look at those in more detail, we'll have them there for you. And um, what else?

SPEAKER_02

You can find us on Twitter at Rework Podcast, or if you feel like talking the old-fashioned way, you can leave us a voicemail at 708-628-7850.