The dispatcher is a very important and critical component of the AEM deployment architecture. Architects or developers often ignore the dispatcher design during the analysis phase, which is a bad practice. In this blog, I have explained high level capabilities of the dispatcher. What is a dispatcher?Dispatcher is the caching and load-balancing tool for Adobe Experience Manager that works with an enterprise-class web server, like Apache. It enables the building of a quick and active web authoring environment. The Dispatcher versions are independent of AEM version. Although the dispatcher version is independent of AEM, dispatcher utilisation must be analysed before starting the development activities and not ignored. Dispatcher deployment architecture may vary from project to project, but overall, it should look like the following:In the next few sections, we will get to know about dispatching capabilities like cache, Sticky connection, Load balancer and security.CachingCaching is the process of putting copies of data or resources that are frequently accessed in a place that makes them easier to find. The goal of caching is to improve the speed and efficiency of a system by reducing the number of times data has to be pulled from its original source.When it comes to caching, the dispatcher functions as an integral component of an HTTP server like Apache. It aims to store (or “cache”) as much static website content as possible and access the website’s layout engine as infrequently as possible. In other words, it wants to maximize efficiency. The Dispatcher module uses the Web server’s capability to serve static information. The cached versions of the documents are uploaded by the dispatcher to the Web server’s document root directory. Dispatcher uses ‘Auto-Invalidation’ which automatically invalidates out-of-date cache after an update.Sticky ConnectionA sticky connection is a method used in computer networking and load balancing to keep a user’s session with a specific server or backend resource. It makes sure that requests from the same client are sent to the same server or resource that handled the first request from the client.The dispatcher has the capability of sticky connections feature, which sees to it that all of the documents associated with a user are processed by the exact same instance of AEM. If you make use of personalized pages and session data, then you absolutely need this feature. The information is kept in memory on the instance. Because of this, subsequent requests from the same user must go back to the same instance, or the data will be lost.Because sticky connections hinder the Dispatcher’s ability to optimize requests, you should only use this method when absolutely necessary. You can specify the folder containing “sticky” documents, ensuring that all documents in that folder are processed on the same instance for a given user.It is recommended to disable the caching of all pages where sticky connections are used. Otherwise, the same instance of the page is displayed to all users regardless of the session content. But there are a few use cases where you can also use both, but such use cases need to be analyzed properly.Load BalancingWhen serving in a load-balancing capability, the dispatcher is responsible for balancing a load of user requests among the several AEM instances (renders). Dispatcher manages and distributes user requests across the AEM Instance. It increases processing power by sharing document requests between several AEM instances. It also helps by increasing fail-safe coverage by automatically relaying requests to other instances if they don’t receive any response. In the event of the unavailability of any of the instances, the site will be slow but will not be completely down.SecurityDispatcher plays a very crucial role in enhancing the security of an AEM website by providing caching, request filtering, access control, SSL termination, and request rewriting capabilities. By implementing these security measures at the edge of the network, the dispatcher helps protect the AEM instance from potential threats and improves the overall security posture of the website. It also prevents ‘Denial of services (DoS)’ attack. A Denial of Service (DoS) attack is a malicious attempt to disrupt the normal functioning of a computer network, system, or website, making it inaccessible to legitimate users.Dispatchers can also protect or prevent CSRF (Cross-Site Request Forgery) attacks and Clickjacking.Conclusion:The dispatcher is a very important and critical component of the AEM deployment architecture. Architects or developers often ignore the dispatcher design during the analysis phase, which is a bad practice. Dispatcher capabilities for caching, Load balancing, and security should be leveraged to make the application faster, more secure, and robust.Reference:https://experienceleague.adobe.com/docs/experience-manager-dispatcher/using/dispatcher.html?lang=enDisclaimer:The views and opinions expressed on this blog are solely those of the author and do not necessarily reflect the official policy or position of any other agency, organization, employer or company. Any content provided on this blog is for informational purposes only and should not be construed as legal, financial, tax, or other professional advice. The author will not be held liable for any errors or omissions in the information provided or any losses, injuries, or damages arising from its use. Visitors should always seek the advice of a qualified professional before making any decisions based on the information on this blog. If you believe any corrections are necessary, please contact me.+10 Post navigation Adobe mitigation: Google to stop supporting third-party cookies by 2024