Search code examples
aemdispatcher

One to One vs One to Many dispatcher configuration in aem


The mapping between the dispatcher and the publisher is very important in designing the application. There are two ways,

One to One -> One pub is connect to one dispatcher
One to Many -> One pub is connect to 3 or more dispatcher

I could not understand which one should be selected on when. Can anyone tell me pros and cons on each options?


Solution

  • In general publisher and dispatcher have a different role in your setup. Of both of them you need as many as you have load. In theory you can start with 2 of them. Whenever they cannot handle the load (CPU or Disk over 100%), then you add one of them. (actually AEMaaCS is doing it that way dynamically)

    With some experience you can forecast the number of required dispatcher and publishers.

    The following scenarios will cause a high load on the dispatchers:

    • many static pages (which seldom change), and a lot of static assets (images, pdf, ...)
    • few pages and extremely high traffic for those
    • In general your site is very good cacheable. Because the dispatcher is a cache in front of the "CMS". Then you probably need several dispatchers for each publisher = one to many (good caching is great, because the dispatcher is cheaper and can handle more load than a publisher)

    The following scenarios will cause a higher load on the publisher. Then you will have a one to one scenario

    • There is a CDN in front of the CMS. The CDN does a lot of static caching, so cache ratio of the dispatcher will go down
    • A lot of static content is already handled outside of the CMS (e.g. images are served elsewhere, e.g. Adobe Dynamic Media)
    • You have many dynamic pages (rendered for each user seperately, e.g. a banking application)

    PS: you will have at least one dispatcher for each publisher. As reverse proxy it has an imported security function. It also is a major backup to avoid downtimes. I know a customer, that is running during maintenance up to 24 hours only the dispatchers. Then they just serve the static content like a normal Apache webserver.