This repository contains a collection of Dispatcher experiments in take-home lab format. The content is intended for intermediate to advanced AEM developers and customizers.
The goal of these experiments is to raise awareness about the Dispatcher, and provide a project for test driving its feature set.
This repo does not attempt to prescribe a one-size-fits-all configuration for the dispatcher. Due to the myriad use cases that AEM supports, it would be impossible to do so. Instead, pick and choose concepts from the below experiments and try them out on your project.
You will need the following SDKs, tools, and apps installed to work through the experiments:
You will also need a local AEM author/publish/dispatcher setup:
:4502
:4503
aem-publish.local:8080
You will need to install the AEM project code contained in aem-project/
on your local author and publish instances:
cd aem-project/
mvn -PautoInstallSinglePackage -PautoInstallSinglePackagePublish clean install
Ready? Confirm by checking:
Navigate to http://aem-publish.local:8080/content/dispatchertester/us/en/regular-page.html. The rendered page should look like this:
And, the dispatcher docroot (cache directory) should contain a static copy of this page:
Re-fetching Dispatcher Flush
In the HelpX article Optimizing the Dispatcher cache, the concept of "Re-fetching Dispatcher Flush" is introduced. This experiment shows the impact.
⇨ Effect of Re-fetching Dispatcher Flush
/statfileslevel
greater than 0The configuration included in the dispatcher download contains a /statfileslevel
set to 0. This experiment demonstrates the performance impact that can be achieved by increasing this value.
⇨ Effect of a /statfileslevel
greater than 0
/ignoreUrlParams
allow listConfiguring /ignoreUrlParams
in an allow list manner is important to improve your cache hit ratio, which in turn can save your publish tier from unnecessary content rendering.
⇨ Effect of an /ignoreUrlParams
allow list
/gracePeriod
settinggracePeriod
is a relatively new feature which can reduce spikes in load when a number of cache invalidation events occur in quick succession.
⇨ Effect of the /gracePeriod
setting
/enableTTL
Dispatcher versions 4.1.11 and greater can be configured to respect a time-to-live (TTL) based content "timeout". Use this experiment to see how it works.
Dispatcher Optimizer Tool
A tool has been created to:
The tool can be run on any Dispatcher configuration, and optionally an associated Apache HTTPD configuration.
Contributions are welcomed! Read the Contributing Guide for more information.
This project is licensed under the Apache V2 License. See LICENSE for more information.