Salta al contenuto principale
Servizi

AEM performance: Dispatcher, caching, CDN and Core Web Vitals

How to reduce response times and stabilize AEM Sites delivery by working on Dispatcher, cache rules, CDN, markup and front-end assets.

The performance of an AEM site is largely decided before a request ever reaches the author tier. A healthy architecture serves as many requests as possible from the CDN and the Dispatcher cache, leaving to the publish instance only what cannot be stored. When that does not happen, the symptoms are familiar: variable response times, load spikes after every publish, stale content served for a long time, releases that require flushing the entire cache.

The Dispatcher configuration is where security and performance meet. Filters define what can be requested, cache rules define what can be stored, invalidation rules define when content must be regenerated. These are three configuration areas that are often copied from one project to another without being understood, and that should instead be designed for the site, the URL model and the real publishing frequency.

On this page we describe how we approach AEM performance and delivery: from analyzing cache hit ratio and HTTP headers to optimizing clientlibs and images, through to improving Core Web Vitals. Interventions are measured, and the success criterion is defined before starting, based on both lab data and real user data.

Dispatcher configuration: filters, cache and invalidation

A robust Dispatcher configuration starts from an allowlist approach: deny everything and allow only what the site must expose, by path, selector and extension. Cache rules define which responses can be stored and how to handle query parameters, so that tracking parameters do not generate a cache entry for every visit. Particular attention goes to personalized pages, which cannot be cached indiscriminately.

Invalidation is the most delicate part. The stat file level, the depth of the tree and the dependencies between pages determine how many resources are invalidated on every publish. A wrong value leads to stale content or to a cache that is almost entirely flushed. Together with TTL-based rules and Cache-Control headers, we design a strategy that accounts for navigation pages, shared components, Experience Fragments and content that depends on other branches.

CDN and HTTP headers

On AEM as a Cloud Service the CDN is integrated and managed by Adobe, while in on-premise installations or with a proprietary CDN it is the client's responsibility. In both cases the consistency between Cache-Control headers, Dispatcher rules and CDN behavior determines the outcome. We define different TTLs for HTML, versioned static resources, images and JSON responses, and verify that cacheable responses are not made uncacheable by unnecessary cookies or headers.

We also evaluate the handling of redirects, rewrite rules and clean URLs, which are often implemented at multiple layers (Sling Mapping, Dispatcher, CDN) in an uncoordinated way. Moving a rule to the right layer reduces latency and makes behavior more predictable. For CDNs and program-specific configurations, available features should be verified against the documentation of the product in use [VERIFICARE].

Clientlibs, markup and Core Web Vitals

A significant share of LCP and INP problems originates in the front-end: client libraries that are too large, loaded in a blocking way, badly aggregated or not versioned, resulting in short cache lifetimes. We work on aggregation and minification, versioning with immutable URLs, deferred loading of non-critical scripts and separation between site code and third-party code. Where the project uses a modern front-end build, we integrate it into the ui.frontend module and the pipeline.

On markup we review HTL and Sling Models to find expensive processing, components that produce oversized DOM, and dependencies on scripts for rendering content that could be static. CLS and LCP depend heavily on declared image dimensions, font loading and the position of critical resources. We work on the templates that matter most for traffic and conversions, with measurements before and after.

Images and assets in delivery

Images are the most frequent cause of high LCP. The Core Image component with adaptive images, correct srcset attributes, modern formats and lazy loading for below-the-fold content greatly reduces page weight. Where Dynamic Media is used, delivery through Scene7 with presets and smart imaging can replace manual management of variants, as described on the page about AEM Assets and Dynamic Media.

For static content and versioned resources, the ideal strategy is a long TTL with immutable URLs, so that the CDN serves almost everything without going back to the origin. For large files such as PDFs or video, it is worth evaluating separate delivery methods. Every choice must be weighed against its impact on permissions, public URLs and tracking.

Measure, monitor and maintain

Without measurements, every performance intervention is an opinion. We define a baseline with lab data and real user data on the main templates, observe cache hit ratio, origin response times and requests that bypass the cache, and set concrete targets for LCP, INP and CLS. Specific values should be agreed with the client based on its audience and constraints.

After optimization discipline is required: pipeline quality gates can include performance checks, Dispatcher configuration changes go through review and automated validation, and regressions are caught in subsequent releases. This work connects naturally to managed services, where performance is monitored continuously and not only during the project.

FAQ

AEM Dispatcher and performance FAQ

Typical causes are invalidation rules that do not cover dependencies between pages, TTLs set too long without a strategy, failed replication to a publish instance, or a CDN keeping its own copies. We analyze replication logs, headers and cache structure to identify the responsible layer.

Almost never. Flushing everything creates load spikes on publish instances and cancels the benefit of the cache. A good strategy invalidates the affected resources selectively and uses TTLs for content that depends on other pages.

By working on images, clientlibs, fonts and markup of the main templates, with measurements before and after. LCP depends heavily on hero images, CLS on declared dimensions, INP on loaded JavaScript. There is no single fix: we start from the highest-traffic templates.

Yes. Even though the CDN is managed by Adobe, cache headers, rewrite rules, custom domains and behavior toward the Dispatcher still need to be defined. The exact possibilities depend on the program and should be verified [VERIFICARE].

We can define test scenarios and interpret the results together with your team. Tools and limits vary by environment and contract, and should be agreed before running tests on shared environments.

Make AEM faster and more predictable

Send us your Dispatcher configuration, CDN setup and main templates: we start from cache hit ratio and Core Web Vitals to propose measurable improvements.

Talk to a Dispatcher expert