Dispatcher is a load balancing and caching tool for Adobe Experience Manager (AEM). It improves performance by caching static content locally and distributing requests among multiple AEM instances. Beyond load balancing and caching, Dispatcher provides additional security and control over cached content. It can filter requests, rewrite URLs, and enforce access restrictions to protected paths and tools. Dispatcher configuration involves editing configuration files to specify caching, filtering, and rendering rules.
2. What is a Dispatcher?
➲ A load balancing &
➲ A caching tool
3. Dispatcher – A Load Balancer
CQ1CQ1CQ1 CQ3CQ2
Web server
Dispatcher
Client
4. Dispatcher – A Caching Tool
CQ
Web server
Dispatcher
Client
Dynamic Content
Remote Content
Static Content
5. Why Use It ?
➲ As a load balancer prevents system from
crashing by distributing requests among cq
server instances.
➲ As a caching tool improves performance by
serving static content locally from your web
server.
6. But …
➲ You can also use it behind a physical load
balancer.
➲ You can also use it for a single CQ
instance.
➲ It is also valid for both Author & Publisher
environments.
7. But .. why not CDNs?
*should not be compared with CDNs … really
➲ CDNs are also caching tools
➲ CDNs serve digital assets from a
geographical location near to you
➲ CDN is a implemented using a Provider
➲ Dispatcher is OTB and made for CQ
8. more than a CDN
➲ By serving static content from Web server
process it reduces load on CQ server
➲ By enforcing rules it filters un-wanted traffic
at the web server level itself
➲ By re-writing urls it protects CQ from
hackers realizing the content paths
➲ By blocking url patterns, headers ensures
added protection & system failure.
9. more than a CDN... Continued
➲ Gives the ability to include SSIs before
request goes to CQ instance
➲ Improves User Experience on the site by
responding quickly when serving static
content
➲ Finally .. gives more control how you mange
(delete or retain) cached files
10. ➲ Just a module and a config file to be used
on a web server
➲ Usually obtained from daycare
➲ Supported web servers :-
Apache Web Server – 2.0, 2.2 & 2.4
Microsoft IIS – 7.0, 7.5 & 8.0
& Oracle iPlanet Web server – 7.0
➲ Instructions to install
dev.day.com/install
How to install?
11. How to configure?
➲ Edit your dispatcher.any file using any Editor.
➲ Sample dispatcher code structure..
/website
{
/clientheaders
{
}
/virtualhosts
{
}
/sessionmanagement
{
}
/renders
{
}
/filter
{
}
/cache
{
/rules
{
}
➲ * preconfigured sample file here
13. What is not Cached …
➲ Urls without file extensions
e.g. /content/en is not cached
➲ Urls with query string parameters
e.g. /content/en/blog/recipe.html?user='amy' is not cached
➲ HTTP 'post' method
➲ HTTP response status != '200 OK'
➲ Header response with
'Dispatcher: no-cache'
What is Cached ? ... Continued
& what is not ?
14. Dispatcher As a Security Tool
➲ Use filter to allow/deny actions &
access to paths/content/tools
Example
/filter {
/0001 { /type "deny" /method "POST" /url "/etc/*" }
/0002 { /type "allow" /method "GET" /url "/etc/*" /query "a=*" }
/0003 { /type "deny" /glob "GET *.infinity.json*" }
/0004 { /type "allow" /glob "* *.js *" } # enable javascript
/0005
{
/glob "* /publish/libs/cq/workflow/content/console/archive*"
/type "deny"
}
}
0001: Deny all POST methods
0002: Allow GET methods with query parameter = a
0003: Prevent json content dumps
0004: Allow javascript resource files
0005: Deny access to protected areas & tools .. workflow console in this case.
15. Dispatcher As a Security Tool
➲ Use virtualhosts for
● Domain mapping
● Re-write urls etc.
➲
Example
/virtualhosts
{
"www.isoap.com"
}
/renders
{
/hostname "internal.isoap.com"
/port "4503"
}
16. Appendix
➲ What is static content ?
Content which may remain un-changed for a specific amount of
time. For e.g. images, scripts, error pages etc.
➲ What is Dynamic Content?
Content which may change with time such as a Sports Score
Card, User Blogs, News etc.
17. More ?
➲ dev.day.com/more
➲ Even more ?
➲ How to configure a publisher environment ?
➲ Even more performance tweaks ?
➲ Deployment landscape & process ?
➲ For commercial implementations
Contact: Venu.Gummadala@gmail.com
Thank you ...