text
stringlengths
0
1.8k
**Gerhard Lazu:** Yes, that's correct. So /inc, that's the shortcut. And I forget what is the command, but if I don't type a command and I just press enter, it asks me what I want to do. "Do you want to declare a new incident?" "Yes, I do." I think that's like one of the first options. I fill in the details, like the t...
I don't wanna spoil it too much, because the episode that soon follows we will be talking with the Incident.io team about Incident and about our experience. So we'll have a whole episode about this - how it works.
**Adam Stacoviak:** What episode number is that gonna be, do you know?
**Gerhard Lazu:** 21.
**Adam Stacoviak:** 21. So it's literally the next episode. So if you're in the future and there's an episode number 21, just pause and go listen to that if you want to and come back. We'll just earmark it.
**Gerhard Lazu:** I didn't want to be too certain... Remember, 100% uptime?
**Jerod Santo:** Haah...!
**Adam Stacoviak:** It's near! It's on deck. I've been using the word "on deck" lately.
**Gerhard Lazu:** Right.
**Adam Stacoviak:** So in Slack you have /inc, which is short for /incident.
**Gerhard Lazu:** That's right.
**Adam Stacoviak:** You can do either inc or incident fully, the full name... And it creates/manages an incident.
**Gerhard Lazu:** Yes.
**Adam Stacoviak:** \[12:01\] So when something happens, you create an incident here, you summarize it, it asks you some questions, there's some interactive process that Incident integrates with Slack to let us use the Slack channel Incidents, the Incidents channel, as our pointer to all incidents that happen now or in...
**Gerhard Lazu:** Correct.
**Jerod Santo:** So let's go back to this Incident 2, and let me tell the story, because it unravels a little bit from this Oban situation which you just thanked Parker... So let me tell that story, because our listener hasn't been in on it.
The last episode we were talking about Changelog.com and the open source codebase that runs it, and Parker was listening to the episode. Parker Selbert. So let me tell that story, because our listener hasn't been in on it. The last episode we were talking about Changelog.com and the open source codebase that runs it, a...
So to tell that story a little bit, when I first wrote all the background processing stuff in Elixir, it was just happening by just backgrounding things with native Elixir functions and features. And that served us very well for many things, such as sending emails, and processing statistics, and anything you don't wann...
So if I write a comment -- I think I have three or five minutes to edit that right away, just for typos, and... You know how you always know it's a typo right after you hit Submit, right? Even with the Preview. We have a Preview button, you can preview the markdown, you can look at it... And then you hit Send and then ...
**Gerhard Lazu:** Undo emails? The feature which I use the most. Undo. Undo.
**Jerod Santo:** Yeah, exactly. This is basically the Undo Email feature in our commenting system... And to do that, we have to say "Okay, delay the email notifications for this comment for five minutes, so that person has a chance to edit it." We don't wanna send out the original if they're gonna change it. So for tha...
So Alex added that and said "Hey, there's a bunch of other stuff that we can cut over to Oban if you want me to", and I was like "Nah, I'll take care of that." And then I never did. \[laughter\] Thankfully, I didn't...
**Adam Stacoviak:** Because things happen...
**Jerod Santo:** ...because Parker was listening to that episode, and out of nowhere, he opens this amazing pull request, the one that Gerhard just thanked him for...
**Gerhard Lazu:** 378.
**Jerod Santo:** 378, where he basically goes through our entire website in best-practiced fashion Oban usage, removing some dependencies like Quantum, which was a cron scheduling thing, which Oban can do cron scheduling... All this cool stuff. So thank you for that. It was an amazing PR, and it was cool to see not jus...
Now, the roll-out to that caused this incident, and it's all coming back to me... He had a typo in the production config, which of course it's only in prod... So none of our test environment runs it, in dev you're not gonna see it, in tests you're not gonna see it... And so I did all my due diligence except for in prod...
**Gerhard Lazu:** \[15:52\] Yes. So first of all, I'd like to thank Charity Majors for coining and popularizing the term -- I'm not sure about coining, but definitely popularizing the term "test in prod." Like, until you test in prod, you're not really testing; you're pretending to be testing. I'm being facetious now, ...
To come back to Jerod's point - yes. This release should have never gone out, in the sense that when the new version came out, because it failed to boot, it should not have been put behind a service, because it was never ready. It would never boot. For some reason, it was, and even to this day, I didn't spend enough ti...
**Jerod Santo:** Yeah, because -- isn't this the way Kubernetes works? It's like, blue-green deploys, or something. It never went green, it should have stayed blue.
**Gerhard Lazu:** Exactly. Yes, it's a bit more basic than that, in that if a pod is not healthy and ready, it will not be put in the service... Because it's not healthy. It has to pass its health checks before it can be marked as ready. And it was never ready. These are the readiness probes. The readiness probes, whic...
**Adam Stacoviak:** So what happened as a result of that then? So the pod that was unhealthy was put into service... And what was the actual incident?
**Gerhard Lazu:** So the incident was that the origin was returning 503 responses. What that means is that the CDN, Fastly - it proxies these requests, it forwards these requests to LKE, Linode, where our app is running. And the origin in this case being LKE, our app running in LKE, was returning 503. This is Ingress N...
Now, this actually affected only a subset of users. The CDN will serve stale content for all get requests. Obviously, not the dynamic ones, not like post, patch, stuff like that. But get, head - all of those, they will serve stale content. If you're logged in, because you're an author and you have like a token and a co...
**Jerod Santo:** Yeah, exactly. So it's kind of like a degraded performance is what it becomes, because there's certain endpoints, certain pages, whether you're logged in or logged out, that don't work... And I think it was actually a redirect that we were used to having there was failing because of a 503 when it final...
**Break:** \[19:30\]
**Gerhard Lazu:** One of the other things that we improved since episode 10 were more redirects at the edge, specifically in Fastly. So now we have www to the root domain to the apex, redirects in Fastly, and things happen very quickly, rather than going all the way to our app. HTTP to HTTPS redirects, which also happe...
**Jerod Santo:** Oh, wow.
**Gerhard Lazu:** ...and we've reduced that to about 300, maybe even lower; I forgot exactly how much it was. Actually, I can look it up. Let me click on this to see exactly -- oh, yes! See? Writing it down. \[laughter\] So our Ingress and our app - they were servicing 44 requests per second from all the Fastly pops, w...
**Jerod Santo:** Wow.
**Gerhard Lazu:** And when we went down, we went to - let me expand the screenshot... We went to about 196. 196 per minute. So we had about 3 requests per second; more than 10x improvement. So we were placing way too much load, way too much strain on our origin. But the thing which I wanted to focus on is some of the i...
**Jerod Santo:** Mm-hm.
**Gerhard Lazu:** So can you tell us a bit more about that, Jerod? Why did you want to make them and how did that work? Because there was also a problem that Adam spotted. That was a good one.
**Jerod Santo:** So first, the why - we don't wanna serve anything over HTTP, because HTTPS everywhere. Let's not worry about it. Everything, always, every time. That's why you do it with Fastly, right? They just go ahead and take care of it in every case.
And then www - well, we just don't like it. Right, Adam? We just like the cleanliness of the Apex domain. I kind of despise the www in our address bar. Some of it is just like personal taste, but really what the problem is is both. That's the problem, more than anything. If we were gonna pick www and redirect that way ...
So we had these issues where it's easier to go from Apex to www than the other way around. And it always had to do with non-standard DNS records; I always never know the details, but you're not supposed to CNAME an Apex domain, so they create these other kind of records that are not part of the DNS spec... Y'all know w...
**Gerhard Lazu:** Yeah, exactly.
**Jerod Santo:** So there's reasons why www on a technical basis is just easier to accomplish. Well, we didn't wanna do that; we don't like Easy mode, we like Hard mode... So nope. Get rid of them. We don't need them, we don't want them.
So that was happening at Fastly, but it wasn't happening universally... So Gerhard, you had kind of turned it on, turned it off over the course of time, because weird things would happen. One of those weird things Adam spotted, which is Safari would redirect sometimes, and then fail to redirect other times. And it woul...
\[23:59\] And the reason for that was that we had basically a bad conditional in our Fastly config, which would match every request, and add a location header to every request, even non-redirect requests... So you'd get like a 200 okay to Changelog.com route, and it would have a location header in there, which - most b...