Dispatcher Setup AEM as a Cloud Service

Setup a dispatcher for AEM as a cloud service in local if we have AEM publish and Docker installed in local.

Follow URL to read more about dispatcher and setup a dispatcher for AEM On Prem.

Dispatcher has two major advantages:

  1. Caching helps us to cache data on dispatcher which helps us to reduce overall response time. Every request first reaches out to dispatcher. Dispatcher will first investigate cache and return the response in case data found on the server. If data not found on dispatcher for that request will hit publish instance to get data.
  2. Load Balancing helps us to reduce load on the server(AEM instance). If site is getting a greater number of hits what we were not expecting. Dispatcher will divide number of requests in between multiple publish instance.

Dispatcher Flow

Below is the overall AEM dispatcher flow:

  1. As shown in below inline diagram, end user or any third-party service hit site URL.
  2. On first place request will reach out to CDN. CDN will return required data if found in cache.
  3. Request will reach out to dispatcher if required response not found on CDN. Dispatcher will return required data if found in cache.
  4. Dispatcher will look for required data in one of the AEM publish instance which can also be called as renderers if not found in dispatcher cache.

Setup Dispatcher

Follow below step by step process to setup dispatcher for AEM publish instance:

  1. It require to install java 11 in local.
  2. Install Docker using URL and run/start same in local.

3. Setup a publish instance having 4503 as a port.

4. Open URL, select the latest SDK sort by date and select below highlighted option to download AEM jar file:

5. Access EULA Terms and condition and click on download button.

6. Unzip below highlighted zip file as shown below.

7. Unzip aem-sdk-dispatcher-tools-2.0.184-windows.zip file and rename it as aem-sdk.

We can have any name in place of aem-sdk as it is custom name and should not be having any space in name.

8. Go to unzipped bin folder and run below command to validate the dispatcher code.

Error:

We may get below error as part of above command:

Keeping below line of code under enabled_vhosts/default.vhost file will resolve the issue:../available_vhosts/default.vhost

Success:

It will give below message on successful dispatcher code validation:

9. Run below command under bin folder providing 4503 publish port instance on 8090 as our dispatcher port.

Note: I am not using 8080 as a port for current dispatcher implementation as it is already use by some other application.

10. Hit url http://localhost:8090/content/practice/us/en.html

Imran Khan

Specialist Master (Architect) with a passion for cutting-edge technologies like AEM (Adobe Experience Manager) and a proven track record of delivering high-quality software solutions.

  • Languages: Java, Python
  • Frameworks: J2EE, Spring, Struts 2.0, Hibernate
  • Web Technologies: React, HTML, CSS
  • Analytics: Adobe Analytics
  • Tools & Technologies: IntelliJ, JIRA

🌐 LinkedIn

📝 Blogs

📧 Imran Khan