1. To configure the Dispatcher / Load Balancer you must adapt is configuration file, usually named dispatcher.any. The name and location you had to define in the web servers configuration file during installation. The configuration file has the following format : /name "name" /farms /farmlabel /virtualhosts "globbingpattern" /filter /filterlabel /type "allowdeny" /propagatesyndpost "flag" /numberofretries "number" /retrydelay "seconds" /renders /renderlabel /hostname "hostname" /port "portnumber" /cache /docroot "docrootfolder" /statfile "filename" /allowauthorized "1" /rules /rulelabel /type "allowdeny" /compress "gzip" /invalidate /invalidatelabel /type "allowdeny" /allowedclients Page 1/8
/clientlabel /type "allowdeny" /statistics /categories /html Entry name Description This is for informational purpose only. farms Each entry in this section defines one farm. NOTE : The virtual host pattern matching is done in the reverse order the farms are defined in this configuration file. For example if the last defined farms entry contains matching pattern * in the virtualhosts entry, it will match all incoming requests! virtualhosts The incoming requests hostname must match with one of the globbing pattern entries in here to be handled by this render farm. You can use the wildcard symbol *. NOTE : If none of the virtualhosts entries match with the incoming request the last defined render farm is taken by default. filter If defined only request matching this ACL get handled. Th default is to handle no request. If the entry is not defined the default is to handle all requests. The patterns are matched against the HTTP Request-Line i.e. you can filter for HTTP Methods. See Examples for more Information. propagatesyndpost By default syndication requests are not propagated to the defined farm entries since they usually are sent directly from syndication sender to the syndication receiver. By setting this flag to 1 you can pass syndication requests through the dispatcher if neccessary. Page 2/8
NOTE : If this flag is set, you must make sure that the POST is not denied in the filter section of the farm. numberofretries The number of time the Dispatcher /Load Balancer should try to reach any Communiqué Instance from the farm before returning a failure. retrydelay hostname port How long the module should wait between retrying to reach a Communiqué Instance. The hostname were the Communiqué Instance or application can be reached. The port where the Communiqué Instance or application is listening. cache In this section the caching for this render farm gets configured. docroot Folder were the cached files get stored. Either use / or \\ to define the path. The path is either relative to the web servers home directory or and absolute path. statfile The file that gets touched each time an syndication is occuring. allowauthorized Pages containing an authentication header don't get cached. If authentication happens before e.g. by using the web servers authentication possibilities you can override this behavior by setting this property to 1. rules In this section you use an Access Control List (ACL) to define wich pages should get cached. The patterns are matched against the URL (handle). See Examples for more Information. glob Defines the matching pattern for the ACL Entry. type Either allow to add it or deny to exclude the ACL Entry. compress Apache Web Server only.if set, a zipped version of the cached page is stored. This allows the apache to send a compressed version to the client if nagotiated so. The only accepted compression format at the moment is gzip. Page 3/8
invalidate When a page gets syndicated (activated or deleted) its cached version gets removed. Additionaly you can define what other files should become invalid in the cache. The patterns are matched against the URL (handle). See Examples for more Information. allowedclients An ACL that defines what Clients are allowed to flush the cache. The globbing patterns are matched against the IP. statistics In this section you can define the statistic categories for load balancing. The dispatcher's load balancing algorithm calculates service time statistics based on the measured response times of each render in a render farm for a particular resource category. To select a rendering engine, the dispatcher will first select a subset of renders in the render farm that are appropriate for the requested resource category. From this subset, the service time statistics are examined and the render with the quickest service time is then used. The categories are configurable in this section. categories Start of the statistic categories. The configuration entry filter has been added in build 5155 of the Dispatcher / Load Balancer. The configuration entry allowedclients has been added in build 5186 (Communiqué 2.6.03) of the Dispatcher / Load Balancer. The configuration entry propagatesyndpost has been added in build 5209 of the Dispatcher /Load Balancer. Please note that older module versions ( Version 1.1. build number < 5000 ) had a different configuration file structure. See the README file in the Dispatcher / Load Balancer Installation fore more details. Examples The following is a common configuration example where the web servers only job is to cache everything and balance among several Communiqué Instances in one render farm : The Dispatcher / Load Balancer will match all requests ( virtualhosts uses "*"). All requests will be handled ( filter is not set). Everything gets cached (there is one allow entry with "*" in the cache section). Page 4/8
Upon activation/deactivation of a page all other cached HTML files get marked for flushing as they may contain invalid references to the maybe deleted page. (see invalidate section). The statistics has two categories html and the rest. /name "internet-server" /farms /website /virtualhosts # This simply matches all incoming requests "*" # The load will be balanced among these render instances /renders /rend01 # This Communiqué Instance is on the same machine as the web sever /hostname "127.0.0.1" /port "8001" /rend02 # This Communiqué is somewehere else /hostname "crux.company.com" /port "80" /cache /docroot "/usr/server4/dispcache" /statfile "/tmp/dispatcher.stat" /rules /0000 # Everything gets cached /glob "*" /invalidate # Its always best to first deny everything in an ACL List /0000 /glob "*" /type "deny" # Invalidate all html files as they may # contain invalid references to a deleted page. /0001 /glob "*.html" /statistics /categories # This the standard configuration /html /glob "*.html" /others /glob "*" Multiple Render Farms If you are using multiple render farms you must make sure you've set the virtualhosts entries Page 5/8
correctly : /name "internet-extranet" /farms /intranetsite /virtualhosts # matches intranet virtual domain name "intranet.*" /internetsite /virtualhosts # matches internet virtual domain name "www.company.com" You can't match against an IP address as it is the same for all virtual domains. More Complex Invalidation Normally its enough to just invalidate HTML files as they may contain invalid references e.g. in its navigation to a possibly deleted page. But you may as well have other files that have to be removed. E.g. docs.day.com creates dynamically a PDF when Print Page or Print Tree gets clicked. Afterwards its stored in the Dispatcher / Load Balancers cache. But when activating a page all dynamically created PDF files must be invalidated since the modified page may be part of the PDF. So the invalidate section would look like : /invalidate /0000 /glob "*" /type "deny" /0001 /glob "*.html" /0002 /glob "*.zip" /0003 /glob "*.pdf" Page 6/8
More restrictive Caching Some of the pages you may not want to be cached. This can have different reasons e.g.: Their content is truly dynamic e.g. Quotes that get updated every minute. The access to the pages is restricted using Communiqué Authentication. So your cache section may look like : /cache /rules /0000 # Everything gets cached /glob "*" # Except pages underneath home/quotes /glob "/home/quotes*" /type "deny" # Except the closed user group sections /glob "*closedsection*" /type "deny" Using the Request Filtering Using the filter entry you can define which requests should be handled by the Dispatcher / Load Balancer. The patterns are matched not only against the URL but against the complete HTTP Request-Line. A Request-Line is defined as following : Request-Line = Method Request-URI HTTP-Version So you can also filter for HTTP Version or HTTP Methods. The following example denies POST requests to be handled by the Dispatcher / Load Balancer : /filter /0001 # first we allow all incoming requests to be handled /glob "*" /0002 # HTTP POST requests get excluded /glob "POST *" /type "deny" Page 7/8
You can't deny the POST request when using the Dispatcher / Load Balancer module on IIS or the cache flushing won't work. Page 8/8