Cloud 5 - Fix Your… Cache

In a two-part season two series, we explore some things that you can look at that will speed up your caching on AEM as a Cloud Service.

Transcript
Just to kick things off, you know, where do I get started figuring out - if my caching is up to par or not? So the easy answer to that question - is there’s a line that will appear in your dispatcher logs on occasion - that looks something like this.
It’ll give you an idea of how much content - is being requested by the dispatcher directly to the publisher instance versus - just being served out of a dispatcher cache only. In a traditional non-CDN based deployment, - this ratio becomes very important as low numbers - usually equal poor performance. And as AEM engineers, - we believe that a 99% ratio or better is attainable. That that makes a lot of sense. Very useful information, Darin thank you. And I have a huge surprise - for our viewers. We have a senior cloud - architect, Damian from here at Adobe, who is going to address - some some of my questions here. And Damian, - could you kind of just start talking a little bit about the CDN that ships - with AEM as a cloud service? I think our viewers would love to know - that. Some information on that. Sure. I think first of all, - thank you guys both for having me. So the main purpose of the CDN - is to reduce latency by delivering cached content - from the CDN nodes at the edge at or near the browser. It’s fully managed and configured for - optimal performance of AEM applications. And you can check out the season - one video on the AEM CDN on the Cloud five season one page Wow. Damian, fantastic. Glad to hear that. - You’ve been watching our videos. That is actually one of my favorite ones. Yeah. Any any tips on - how we can maximize our cache on the CDN? So first of all, by default, AEM - as a cloud service will serve HTML files with an instruction - to cache on the CDN for 5 minutes and client libs which include both CSS and JavaScript for much longer. Whenever JavaScript - or CSS changes in your customizations, a new client lib URL is used, - so you do not have to worry about a stale cache - interfering with your recent changes. So all of that is out of the box if you want to customize things, - you can do so by setting cache control headers in the dispatcher - v host files to change that behavior.
How would I handle images? So images - do not have the same type of instructions as HTML or client libraries which by default means they’re not - globally cached like like those files. But this is something - that you can control. We do have the experience league site, a documentation page named caching in AEM - as a cloud service. This talks about how to adjust - your dispatcher to improve cache ability of your pages. You can vary the cache instructions for images by path, by extension or and other things like that. Yeah, really useful information. Thank you. Damian. How would I know if my site needs improvement - or if it would benefit from more caching? Well, Google has actually written - a nice tool named lighthouse. It’s it’s free. You can score the performance of your site just by running it, and it makes recommendations on how to improve - your overall site performance. It really is the best place to start. Great. Great. Well, now I’m going to ask you - a specific question on my site. And basically, - I’m having a issue with overseas visitors. They’re experiencing really slow, low load times on my AEM cloud service site. Any any suggestions or tips - so I can utilize your expertise here? Yeah. So most often what we’ll see is that this relates to the images topic - that we mentioned a minute ago. So if the overseas users are not seeing images delivered from the CDN cache, - then it’s quite possible they need to, you know, travel - all the way over to overseas. And this introduces latency - and it it’s just going to be slower so what you can do, you can have one of your overseas - users, you can sort of troubleshoot this together, have them open a browser and open the developer tools. And from there you can you can check the headers of all the - the files that are being served. So this will let you - first of all, figure out if it is being cached at the CDN - it will also let you see - how many seconds or milliseconds each part of the page takes to load and here on the screen - are a couple of quick screen optimizations you can make in your dispatcher - that can help speed things up.
Wow. Great. Tips. Thank you so much for being a guest - on the Cloud five series Damian. Gladly. Thanks for having me.

Content covered in this video

recommendation-more-help
4859a77c-7971-4ac9-8f5c-4260823c6f69