What defines an “optimal” Adobe Experience Manager (AEM) Dispatcher configuration? And if there really is such a thing, why not just print it here in place of this post? Better yet, prevent anyone from actually configuring the Dispatcher at all, and only support the optimal configuration!
Unfortunately, it’s not quite that simple. While the exact property values, number of farms and vhosts, and contents of the /filter set will vary between each AEM implementation, there does exist a common set of goals which all optimal Dispatcher setups seek to achieve. At a high level, an optimal configuration will:
1. Maximize the cache hit ratio of the public facing site
2. Reduce the impact of unexpected or malicious requests
3. Limit the effect of activations on the contents of the cache
At Adobe, we’ve been working on a tool to help you optimize your use of the Dispatcher in pursuit of these 3 goals. In this post I’ll be introducing you to the AEM Dispatcher Optimizer Tool, or DOT for short.
There are additional details logged which may help us understand what's going on. For example, if there are 2 dispatcher.any files in the configuration, the DOT may be analyzing the wrong one, which could lead to it not picking up the changes you've made to the active configuration. If this is the case, look for the an entry in the logs similar to this:
[WARNING] More than 1 "dispatcher.any" file was found in repo url (count=2). Using first file.
[INFO] Loading configuration from file. File="code/aem-dot-example-project/src/dispatcher1/dispatcher.any"
If this is not the case, you can also find additional detail in the logs about where the issue was detected. For this rule, look for "DOTRules:Disp-7---selector-allow-list" in the logs: