Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Understanding the Role of CDN and Dispatcher in AEM

Avatar

Level 2

I'm currently working on optimizing the performance and content delivery of our AEM-based website, and I have some questions regarding the use of Content Delivery Networks (CDNs) and the Dispatcher in AEM.

  1. CDN vs. Dispatcher in AEM: I understand that both CDN and Dispatcher play a role in improving website performance, but I'm looking for insights into their specific use cases within the AEM ecosystem. How do they differ in usage, and in what scenarios should one be preferred over the other?

  2. Dispatcher as a Cache in AEM: I've also heard that the Dispatcher can be used for caching in AEM. Could someone explain how this caching differs from what a CDN offers, especially when it comes to AEM-specific content and dynamic pages?

  3. CDN Placement: In our setup, should we have a CDN in front of the Dispatcher, or should the Dispatcher be in front of the CDN for our AEM-based website? Are there real-world examples or best practices that can help me understand the benefits of one approach over the other?

I'd greatly appreciate any insights, real-world examples, or best practices from the community to help us make informed decisions on optimizing our AEM website's content delivery and caching strategy.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @AEM_rookie 

 

 

Dispatcher as a Cache in AEM: Please refer to:

https://techrevel.blog/2023/08/28/deep-dive-into-aem-dispatchers-cache-flush-strategies/

It contains details on the caching strategies and flush mechanisms.

 

More details on CDN + dispatcher and their placement:

CDN is placed in front of Dispatcher. CDNs are used to deliver cached content from edge locations that are closer to the end-users, reducing latency and improving content delivery speed.

 

https://www.slideshare.net/andrewmkhoury/dispatcher-caching-aemgemspart2jan2015

https://www.chinafy.com/blog/what-cdn-does-adobe-experience-manager-aem-use-and-does-it-work-in-chin... 


Aanchal Sikka

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hello @AEM_rookie 

 

 

Dispatcher as a Cache in AEM: Please refer to:

https://techrevel.blog/2023/08/28/deep-dive-into-aem-dispatchers-cache-flush-strategies/

It contains details on the caching strategies and flush mechanisms.

 

More details on CDN + dispatcher and their placement:

CDN is placed in front of Dispatcher. CDNs are used to deliver cached content from edge locations that are closer to the end-users, reducing latency and improving content delivery speed.

 

https://www.slideshare.net/andrewmkhoury/dispatcher-caching-aemgemspart2jan2015

https://www.chinafy.com/blog/what-cdn-does-adobe-experience-manager-aem-use-and-does-it-work-in-chin... 


Aanchal Sikka

Avatar

Community Advisor

@AEM_rookie  what a name you have chosen for you ...!

I would try to answer your queries as much as I can:

Yes both are used to improve AEM based site's performance by enabling caching but can not  replace each other as both have different offerings like dispatcher doesn't provide edges on networks.

if you have traffic from all over the world then having CDN edges has its own advantages because content to the user will be served from the nearest edge.

If you wanted to implement some security measure for your application, you have only few features available with dispatcher but with CDN you will have many options like to prevent DDos attack, you can easily detect Bot traffic and block it on CDN level itself.

If you wanted to get some information about the user's location to perform some task like location based personalisation, you can not get any from dispatcher but you can easily get it from CDN. 

Thru CDN you will be implementing one extra layer of security and caching which will significantly improve your site performance.

But it doesn't mean dispatcher is of no significance, 

without dispatcher you can not implement session management in case of multiple publisher setup.

Dispatcher serves content to CDN as origin so one middleware layer for your actual content will secure your setup in case of any urgency.

Your dispatcher will  host all your re-write rules for URL shortening, which is not easy at CDN level as dispatcher is more compatible with AEM.

If you have any rule for serving dynamic content, which is one thing can be configured easily with dispatcher.

Now coming to your placement part, I have seen several AEM site implementation with dispatcher and CDN every where I have see like:

AEM Publisher--->Dispatcher---->CDN.
Reason behind will be session management, virtualhost configuration, filter implementation and rewrite rule implementation will be very easy and secure and compatible.

Hope I was able to answer your queries.

Umesh Thakur