Rush hour made easy — preparing for high traffic with Adobe Experience Manager as a Cloud Service

Rush hour made easy — preparing for high traffic with Adobe Experience Manager as a Cloud Service

If your organization experiences its busiest or “peak” season during the holiday season, you might be thinking about how to optimize your Adobe Experience Manager site for a rush of visitors. With the built-in ability of Experience Manager Cloud Services to automatically scale up or down to meet these traffic demands, your site is already on the right path to provide an excellent experience despite any sudden changes in traffic.

To best prepare your site for peak season, we recommend that you and your team take a moment to work through the following tips and best practices. We also recommend implementing these strategies before and during high-traffic dates.

These steps can be the difference between a standard peak season and one that stays with your customers — and keeps them coming back every year.

Caching in Experience Manager as a Cloud Service

Caching can be overwhelming, so let’s break down why it matters. Cached data is essentially stored information that allows the site to load quicker, providing site visitors with a better customer experience. If you want to get more technical, it increases data retrieval performance by reducing the need to access the underlying storage layer.

But it’s so important because customers are becoming increasingly impatient. In only a matter of milliseconds, you can lose a customer while they are waiting for your site to load, costing you a conversion. If your site continuously takes a long time to load, these lost conversions quickly start to add up — and the last thing you want is for them to click the link below yours in their search results.

Luckily, Experience Manager as a Cloud Service is designed to scale up and down as site traffic changes, but it is crucial that you have it set up properly to provide website visitors with the best possible experience. This is one of the most important steps in preparing your site, so we recommend prioritizing it when preparing for your peak season. Check out this Experience League article, which dives into coding best practices in your Experience Manager as a Cloud Service dev environment.

Caching in AEM Experience Manager as a Cloud Service

Now that you’ve mastered the basics, here are a few more tips to keep in mind when anticipating high traffic.

1. Enable image caching

Images are critical to every site — but when improperly managed, the resulting image cache can overload your servers and lead to slower page loading speeds. Caching your images reduces the time it takes for site visitors to view the image.

For images and any large assets (such as PDFs), the default behavior for customers onboarded to Cloud Service after May 2022 is to cache by default. Older programs do not cache blob content by default, and it’s recommended to change this behavior to the new default. Read more about image caching here.

2. Utilize the Vary header

Overusing the Vary header can bring your caching strategy to almost zero. Think of this the same way you think about caching images — the better your strategy is, the better your customers’ experience is. Both mean more cash in your pocket. We recommend avoiding using User-Agent as part of the Vary header. If your project was created with the Experience Manager archetype project v28 or later, you don’t have to worry about this. If it was created from an earlier version, we recommend changing this behavior to the new default. Read this article section about further optimizations for more information on how to remove them.

3. Apply stale-while-revalidate and stale-if-error directives

Keep customer experience at the forefront by applying stale-while-revalidate and stale-if-error directives. These optimizations are crucial for launches, especially during high-traffic dates. Whether your team has a traditional holiday peak season or your own unique high-traffic dates, preparing ahead of time is crucial in maintaining a positive site experience for your customers. For example, you might want to launch a Black Friday campaign to create a lot of traffic for the site. Without stale-while-revalidate directives, you may see a delay or potential errors in the initial minutes after the campaign has launched while a new cache is being built.

There’s no good reason to not use these directives. Again, this article goes into more detail on the next steps you can take to prevent any caching issues with a new campaign launch.

4. Add query parameters

Don’t forget about query parameters. These are often added to campaigns to track activity, and they are unique for each site visitor. Query parameters can “bust” the cache, meaning that each visitor will end up with their own version of the page in the cache (effectively bypassing the cache).

More specifically, the ignoreUrlParams section defines which URL parameters are ignored when determining whether a page is cached or delivered from the cache. The two most important things to note are:

  1. When a request URL contains parameters that are all ignored, the page is cached.
  2. When a request URL contains one or more parameters that are not ignored, the page is not cached.

When a parameter is ignored for a page, the page is cached the first time the page is requested. Subsequent requests for the page are served via the cached page, regardless of the value of the parameter in the request.

If you’d like to learn more about ignoring URL parameters, this Experience League article does a great job walking you through it.

5. Configure the dispatcher

Configuring the dispatcher will help you get your cache ratios as high as possible. By default, the content type HTML/text is set to expire after 300 seconds (5 minutes) at the dispatcher layer, a threshold that both the dispatcher cache and CDN respect. During redeployments of the publish service, which happens daily as part of some routine maintenance, or each time you’re running a deployment via Cloud Manager, the dispatcher cache is cleared and subsequently warmed up before the new publish nodes accept traffic. This quick video explores how the dispatcher works with Experience Manager as a Cloud Service and Cloud Manager.

Luckily, Dispatcher Tools are part of the overall Experience Manager as a Cloud Service SDK. These tools provide:

If you’re curious to learn more about some best practices and differences between Experience Manager as a Cloud Service and Adobe Managed Services (on-prem), this quick video does a great job talking through deploying dispatcher files in a cloud service environment.

Need more guidance?

If you’d like more content on preparing your site for peak season, we recommend these two videos for further information

Deploying code and Continuous Integration and Cloud Manager.