CQ Dispatcher Overview
Dispatcher is CQ Load balancing and caching tool. It runs on web server (IIS or Apache). In order to improve CQ response time it is very important that most of the content is served by web server. Dispatcher provides following benefits,
- Load Balancing: Dispatcher provide a way to balance load between different publish server.
- Static Content delivery: Dispatcher provide powerful way to deliver and invalidate static content.
- Security: Dispatcher add extra layer of security to CQ hosted site.
- fail safe coverage: In case CQ instance is down dispatcher can serve request.
In addition to above benefits Dispatcher module provide various configuration to optimize Content delivery in CQ.
Dispatcher Caching Architecture:
Dispatcher follow simple rule:
- If document is present in cache, dispatcher returns document from cache
- If Document is not present in cache then request is made to CQ instance to serve document. And depending upon if document can be cached or not it is cached in dispatcher.
There are two way content is updated in Dispatcher:
- Content Update: Through Syndication request from Author or publish request. This cause cached files to be deleted from dispatcher and update "statfile"
- Auto invalidation: This cause part of cache get invalidated without physically deleting cached file.
How Dispatcher Returns Document:
Which documents is subjected to caching in Dispatcher:
- If document is requested through GET or HEAD request
- If there is no query parameter (?) in request
- If there is no extension to request. In that case dispatcher can not determine MIME Type and hence can not cache.
- If there is no authentication header to request.
- If document is not denied by caching rule in dispatcher.
More detail about dispatcher can be obtained from here