5 Replies Latest reply on Nov 20, 2013 1:08 PM by Radoslav Husar

    HTTP Session Replication Internals in AS 7?

    Alex Chaniotis Newbie

      I am trying to figure out 2 things regarding HTTP session replication in a domain configuration under AS 7:

       

      1.  Does the Infinispan heap live within the main AS 7 instance's JVM?  I am assuming it does, but wanted confirmation.

       

      2.  If the answer to #1 is "yes", then what is the proper configuration tactic to control which nodes in the domain replicate sessions to one another?  For example, if we are running 2 different, unrelated applications each within its own server group and don't want Application ABC to replicate sessions to Application XYZ, how do we control that?  Are the session replication boundaries controlled by assigning each application it's own named Infinispan cache?  Or, is the session replication boundary controlled by server group assignment (I doubt this)?

       

      Any feedback would be greatly appreciated.  Thanks!

        • 1. Re: HTTP Session Replication Internals in AS 7?
          Radoslav Husar Master

          Hello Alex,

           

          welcome to the community forums!

           

          1.  Does the Infinispan heap live within the main AS 7 instance's JVM?  I am assuming it does, but wanted confirmation.

          Yes, that's correct. Let me note here, if session passivation is configured, some sessions may also be passivated to disk. E.g. if they haven't been accessed for a long time.

           

          2.  If the answer to #1 is "yes", then what is the proper configuration tactic to control which nodes in the domain replicate sessions to one another?  For example, if we are running 2 different, unrelated applications each within its own server group and don't want Application ABC to replicate sessions to Application XYZ, how do we control that?

          The best approach is to sparate the clusters by specifying different UDP multicast group for each cluster. That way, the 2 partitions will not form a cluster neither will they be routed unnecessary replication messages. Of course, they will remained managed by the domain as usual.

           

          Are the session replication boundaries controlled by assigning each application it's own named Infinispan cache?

          Yep, you can also do that.

           

          Or, is the session replication boundary controlled by server group assignment (I doubt this)?

          Domain and clustering are orthogonal concepts, so no. Though, you man want to set different multicast groups for each server group config.

           

          HTH,
          Rado

          • 2. Re: HTTP Session Replication Internals in AS 7?
            Alex Chaniotis Newbie

            Thank you for the insight.

             

            So, let's say that we have 10 different applications that we want to each have their own UDP multicast group.  Would the correct way to configure this be 10 different socket-binding-groups (one for each app) in the domain.xml each having distinct jgroups-udp multicast port?  Does the socket-binding-name for the jgroups-udp need to be unique or just the multicast port?

             

            Thanks again!

            • 3. Re: HTTP Session Replication Internals in AS 7?
              Radoslav Husar Master

              Can you outline the topology we are looking at? How many physical machines/JBoss AS JVMs/applications on each?

              • 4. Re: HTTP Session Replication Internals in AS 7?
                Alex Chaniotis Newbie

                Here is the example topology:

                 

                3 physical servers

                10 different applications, each deployed to 3 nodes, one node (AS JVM) on each of the physical servers (so total of 30 nodes (JVMs) across 3 physical servers) ... each application replicating HTTP sessions only to 3 nodes, not all 30 nodes.

                 

                [so we have 1 application per AS JVM x 3]

                 

                Please let me know if this isn't clear.

                • 5. Re: HTTP Session Replication Internals in AS 7?
                  Radoslav Husar Master

                  Sorry, forgot to get back to this  thread!

                   

                  So the best approach is to use a different multicast group for each cluster. So if you have 30 JVMs, 10 on each server, and 3 servers that are forming a cluster for one app, you should setup the AS instances to talk on 10 different multicast group addresses. This way, they won't exchange unnecessary data and each cluster will receive relevant data.

                   

                  This should be very easy to setup.