 Hey everyone, thanks for coming in this morning and thanks to Adam for showing me what a professional talk looks like. This won't be that So this is about preparing for a high-traffic event and hopefully some simple steps that you can take to help increase the chances of it being successful And That still says subtitle headline. Yeah choice So hi, I'm Sean technical account manager slash problem solver slash I have a lot of hats that I put on at amazing. I own And I passed at a Wellington, which you can see is at the bottom of the planet right there as a flat earth and With them on Twitter with them on triple org So if you want you can ask me questions on Twitter You can find me after this presentation if you want to go into any go into debt from anything I talk about So first of all, what is a high-traffic event? Well, this is the obvious one like we didn't have something and now we do have something it's probably a high-traffic event We're migrating from Saikor to Drupal. That's probably high-traffic This is probably one you don't know about but your marketers are actually doing this every day and they don't tell you Black Friday, that's an example of a planned event. It could be the Australian open that happens every year. You know about it Or it could be that you don't know about it and It's your own user media site for instance and Donald Trump says something on Twitter Which is every day So step one I Think this is just the baseline like you need to do some basic Drupal stuff and I probably don't need to tell anyone this room, but there's some really problematic modules with Drupal that you maybe want to avoid I could talk for 40 minutes on radio activity It's a terrible module if you use it. I'll find you The statistics module is in core. I don't think it should be let's just say that much page cash Yeah, if you have a reverse proxy you don't need page cash Dynamic page cash though is useful if you have authenticated users and What is your minimum cash lifetime? Is it five minutes an hour? 30 days Has someone thought about that or someone just like pushed it from a development box six months ago and forgot about it Have you turned stuff on and if you want have a chat with Carl and Josh and I talked to you about Drutney but Drutney is a way to help audit your site and You know check for these things in an automated fashion. So if you launch sites all the time you should really be using you know tools that do your job for you and Another of my passions is a CDN so I could talk definitely a lot about this, but I'm gonna smash into one slide Use one. I don't care how small your site is you should use one and You can think of it like an insurance policy. It's there. It's got your back It does really cool stuff like Ted cashing so you can have multiple points of presence all over the world and then one that's closest to your origin and They'll talk to each other before talking to you and now that you have a CDN How do you go about actually utilizing it effectively? So every request that goes through your CDN is problematic the most yeah the highest performing triple site will have a hundred percent cash offload all close to it and Yeah, these are the types of things that I see all the time when people want to say that they just don't How they just forget about especially if you are replatforming you're gonna have a lot of 404s People have an old URL structure moving to a new one. No one created the redirect map. So there's like a boatload of 404s sometimes you use ad words and Fun fact it ad words has a query parameter called GCL ID Which is unique guaranteed for every user and every click So that is not fun redirects has mentioned and Have you thought about all the people that are just trying to scan your site every day like even though you're running Drupal Someone will ask for WP login PHP like guaranteed like it just happens and Last year I did a talk on WAF tuning specifically with Cloudflare So if you are interested in that go watch that talk And Because Adam didn't have any I'm gonna have some memes. So yeah, this actually happened to a customer of mine They had a marketing department. They launched a new product. It was amazing. They took out their site. So Yeah, ad words is problematic low testing So I keep like I guess the key thing here is do it That's probably my first piece of advice And my next piece of advice is if you do if you don't have someone who does it and your resource plan Go find someone who does because Jimmy who does CSS doesn't do low testing It is complicated Emulation of user activities and paths emulation of all the requests timings concurrency The uncertainty factor how many people are actually going to visit your site. Do you know can you do a scientific wild-ass guess on that? It's iterative you don't just do it and then you say it's done you do it you improve you get better you do it again closely related to that is scaling So now that you have in place your hardware that you think you can deal with the event What happens when you get more or less? Because you don't want to pay for hardware you're not using and similarly you don't want to go down if you get too much traffic so You need to consider auto scaling and you need to consider a platform that auto scales and Test the auto scaler. So we learned from previous next that skipper does really cool stuff with FPM Prox and is able to do auto scaling on really cool metrics You can also scale on like CPU and RAM and all sorts of other things But I guess the key idea is here to test the auto scaler. Make sure it triggers at the right point Make sure it goes down at the right point make sure you're comfortable with how long it takes to do that and That's pretty much what happens when it's not done, right? As you just leave it problem for someone else and it's typically your poor ops team so think of your ops team give them some love and This if I guess if you had one slide to kind of come away with Have a good fallback So plan for the worst Like what happens when? Yeah, your site does go down. Say a developer pushes a bad You know commit say your content editor Edits the view on the home page and removes pagination and you get a thousand items on your home page and the home page ohms and chaos rains So what is the next best experience you can offer if your origin is dead? So most CDNs will have a feature called load balancing So why not have a hot cluster sitting somewhere else? And I know Kurt sitting in the audience here does this with one of his important sites Yeah, this is an insurance policy and then test it so Netflix has something called the architect that called chaos monkey right where they just start pulling out Effectively turning off VMs and killing pods and just keep doing it. See isn't just what happens Does the system respond does the load balancing flick over do we see a disruption in service and Someone Karl sent me this picture Which I thought was hilarious so This is a real image from ABC news from a couple days ago. This is their good fallback This is one of the busiest sites and say in the news industry in Australia. I Mean it's pretty helpful. It tells you the websites terrible But it's not actually that useful. So if I was ABC news, I'd have Maybe a scraper running every minute I would stick that content in an S3 bucket and then I'd get the CDM to swipe over to the bucket There's an answer or maybe the CDN could be configured to when the origins dead to Serve the older content it has in its cache that maybe is no longer valid So, you know, you might say the home page is good for one minute and after one minute you go to the origin It's dead. So you just go have that really old You know one minute old page is still probably okay warm your cash So this is probably makes more sense if you have a large website with a lot of content There's not hit very often like a news and media site is a good example of this But there's a really cool module called warmer, which is pluggable and out of the box it has integration to read your site map and Run through a crawler to actually request all those URLs You can also warm your entity caches and Drupal and all that it's pluggable So if you want to do a special warming process that maybe is different from other people Yeah Best picture of this load Know your third-party API integration points So this matters when Drupal is rendering content that is actually sourced from somewhere else and Drupal is entirely dependent on that API and It what a lot of people fail to grow because that if Drupal is trying to request that API and The API is having a sad time. So it's Slow or say you're in a high traffic event and the API is knows passes what it normally is You're actually tying the speed and availability of your application to the API So even though you're you know, your hope your website has a nine nine point nine five uptime SLA the API might be maintained by Bob from accounting and it sits on a Raspberry Pi under his desk and it's always good to know and Yeah, and the really tricky part here is that if your API does die you need to have a way to You know still be up. So there's there's a couple of ways you can mitigate this You can move the API request to the front end to a JavaScript application And that way if the API is dead your page still can say something semi intelligent And if you want to visualize this you can use tools like New Relic. They have an external request feature So if PHP is reaching out you can find out Generally how often and generally how fast that API is analytics So when you're under a high traffic event, you need to know As close to real time as you can possibly get it. What's going on? So how this system is currently performing How many requests are you getting where they're coming from? What's your CDN's cache offload rate? Is it good? Can it be better? So, yeah, just being able to have this data on hand so that you can make judgments and you can react to this in real time Yeah, that's how you win if you start to see like a classic example was on High traffic event maybe two years ago a fun fact with Drupal 8 is you can have index dot PHP forward slash and then any path and That will still work except now you've got two versions of your site on the internet and someone on Twitter She's sharing the wrong link and yet anyway, it gets out of hand very quickly So you need to have a way to redirect that path in a wild card fashion back to What it should be? So knowing what tools you have at your disposal is quite useful So Can you change engine X configuration? Can you change the CDN? Can you change Drupal? Can you do a hotfix release? How long does it take? Do you need to clear the cache? Like you need to know the answers to all of these questions so that you know what tools you have in your tool bout to fix problems when they come up and And to let you know kind of where you can take this. This is real I can't hear the name of the vent, but you can look at the countries and kind of work out What kind of group they lie in and this event was on the Gold Coast three years ago But we had a Dub-dub-dub off-line, which was Drupal 98.46 that was actually low We got that higher and a result start which was a third-party system, but we looked after it and We could see requests and near real-time. This is probably five minutes delayed and we could actually spot problems in the other application that wasn't Drupal before they knew about it and This was on a big projector sitting on the big wall and it had exact visibility so Yeah, make a song and dance about it like make it real make your stats live Yeah, I talked about this already, but I'm been able to respond to those events so personally I love page rules and Clowflare page rules are I don't know like an unsung hero of a high-traffic event for Yeah, the Australian Open I think we ended up using 40 something to give you some sense of how many we added after the game started So just responding to little tweaks here and there fixing up silly things that were happening and Because when you are in a pinch Sometimes you need to go through change control to get changes released sometimes a Drupal application changes impossible Because it requires seven meetings and by then the problems are already going to be gone Yeah, so knowing what you have in your in your tool about there to help solve those issues right Number 11 that's your hosting provider. No, so don't have a high-traffic event by yourself Tell people Tell your hosting provider tell your support team tell your business team tell people to be on the watch for it You know and yeah, I love this picture, but yeah, hug off so be nice to your ops team like Don't go yell at them when the sites down and because it was your fault because you didn't let them know and To kind of wrap this up and put a bow on it right like what does success for your high-traffic event look like So you have minimal requests flowing through from your CDN your CDN isn't I Think a good thing to aim for in a high-traffic event is 99.9 plus percent offload if you can get in that realm Then you have a much better time Your hardware graphs are boring boring is good Flat lines good No ransom Twitter might be too hard But at least no trending hashtag Senses fail as a classic Australian a trending hashtag. So you don't want your own fail tag so avoid that and Yeah, users will remember the event for its content and not the problems and that's the main thing hopefully they'll walk away with and That's all I have any questions I'm happy to take one-on-ones after as well. Yeah, yeah, cool. Oh, I've got morning tea next great. Thank you so much Thank you