Expand my Community achievements bar.

SOLVED

AEM Dispatcher Sticky Session with multiple publishers

Avatar

Level 2

Hi Everyone, I am trying to achieve sticky session connection using the dispatcher along with two publishers. I added the below configuration for..../stickyConnectionsFor "/content/project/en/*". 

I have also denied catching for the respective pages, so dispatcher is not catching the pages I have defined here.

I have two publisher server connected with a single dispatcher inside the...renders{} block for load balancing.

/renders {

       /rend01

                 {

                /hostname "127.0.0.1"

                /port "4503"

                /timeout "0"

               }

        /rend02

                {

                /hostname "127.0.0.1"

                /port "4504"

                /timeout "0"

               }

          }

I have added the below session management configuration as well.

/sessionmanagement

          {

           /directory "/usr/local/apache2/.sessions"

           /header "Cookie:login-token"

           /encode "md5"

           /header "HTTP:authorization"

           /timeout "800"

         }

Problem: Now whenever I am logging into the system it logs into publisher1 which is correct but on refreshing the page it is switching to publisher 2. Which means the stickyconnectionFor is not working properly. When I login again it is sometimes logging in other publisher server, so now i see two login tokens in the osgi of both publishers http://localhost:4503/system/console/tokenmgr and http://localhost:4504/system/console/tokenmgr

Sometimes I see multiple tokens in the 4503 and 4504 individually for a single user. I am not able to find any proper information in the internet or Adobe forums. Could you please guys help me to fix this strange issue I am finding in the AEM dispatcher for handling sticky session connection. 

Thanks in advance

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

looking through some archives there may be an issue when you log in, which means this value is ignored and the request is sent to any publish instance. Can you try without logging in?

Also, is there any reason you are using only a single dispatcher in front of two publish instances? The recommendation is to use one to one configuration between dispatcher and publish instances

If it still doesn't work please raise a daycare ticket[0]

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

Hi,

looking through some archives there may be an issue when you log in, which means this value is ignored and the request is sent to any publish instance. Can you try without logging in?

Also, is there any reason you are using only a single dispatcher in front of two publish instances? The recommendation is to use one to one configuration between dispatcher and publish instances

If it still doesn't work please raise a daycare ticket[0]