Tuesday, 29 October 2024

Dispatcher configurations in AEM - 2

 Dispatcher configuration


1. The Dispatcher configuration is stored in the dispatcher.any text file.

2. The file contains a series of single-valued or multi-valued properties that control the behavior of the Dispatcher.

Property names are prefixed with a forward slash /.

Multi-valued properties enclose child items using braces { }.

Example

# name of the dispatcher

/name "internet-server"


# each farm configures a set off (loadbalanced) renders

/farms

 {

  # first farm entry (label is not important, just for your convenience)

   /website

     {

     /clientheaders

       {

       # List of headers that are passed on

       }

     /virtualhosts

       {

       # List of URLs for this Web site

       }

     /sessionmanagement

       {

       # settings for user authentification

       }

     /renders

       {

       # List of AEM instances that render the documents

       }

     /filter

       {

       # List of filters

       }

     /vanity_urls

       {

       # List of vanity URLs

       }

     /cache

       {

       # Cache configuration

       /rules

         {

         # List of cachable documents

         }

       /invalidate

         {

         # List of auto-invalidated documents

         }

       }

     /statistics

       {

       /categories

         {

         # The document categories that are used for load balancing estimates

         }

       }

     /stickyConnectionsFor "/myFolder"

     /health_check

       {

       # Page gets contacted when an instance returns a 500

       }

     /retryDelay "1"

     /numberOfRetries "5"

     /unavailablePenalty "1"

     /failover "1"

     }

 }


3. If dispatcher file is large, it can be split into manageable files and can be included using below property

$include "myFarm.any"

$include "myFarm_*.any"

4. If there are values e.g. IP addresses, website alias/host names OR any values which are redundent, a separate file containing variables and their values can be created. Those variables can then be used as below

/docroot "${PWD}/cache"

/renders {

  /0001 {

/hostname "${PUBLISH_IP}"

/port "8443"

  }

}




No comments:

Post a Comment

Dispatcher configurations in AEM - 2

 Dispatcher configuration 1. The Dispatcher configuration is stored in the dispatcher.any text file. 2. The file contains a series of single...