2 Replies Latest reply on Apr 26, 2011 12:07 AM by mp911de

    HTTP Session Sharing

    hoffmanjon

      Good Morning,

      I have a quick "Can this be done" question.

      I would like to configure our JBoss servers to use HTTP Session Sharing without configuring the load balancer (mod_jk).  In our setup, we have multiple JBoss servers running with a hardware load balancer in front of it (doing more then just load balancing so we do not want to pull it out) however we are experiencing some issue with the "Sticky" sessions (users are getting new IP addresses and being sent to other servers where their session is not being recognized).

      So we would like to enable session sharing but still use our hardward load balancer, is this possible?  We are using JBoss 4.2.3 and section 16.5 of the documentation (if I am reading the right one) describes session replication but it looks like you need to enable mod_jk for it to work.

       

      Thanks

       

      Jon

        • 1. HTTP Session Sharing
          sharda01

          Hi Jon,

           

          I would like to know if you were able to find the solution for this. We are having a similar issue wherein hardware based load balancer is used with sticky sessions. So as far the request goes to same jboss node, the session is retained but as soon as request goes to another node, the session is lost.

          • 2. HTTP Session Sharing
            mp911de

            Hi there,

            you just need to set Clustering up (with adding <distribuatable /> to your web.xml), then it works fine (see http://community.jboss.org/wiki/HttpSessionReplication for further information). Mod_jk isn't needed as the session-state is replicated inside JBoss.

             

            When your JBoss sends his internal IP, you can set proxyName/proxyPort in your HTTP Connector (server.xml). This way JBoss returns the Proxy-Address (your LB's IP) on getLocalName(), getLocalAddr() and getServerName().

             

            Best regards,

            Mark