11 Replies Latest reply on Mar 6, 2013 5:48 AM by rhusar

    Achieving multiple and different clusters under a single Domain Mode setup in AS 7

    vbchin2

      Please let me clarify what I mean by multiple and different clusters. My cluster setup resembles somewhat to the below architectural diagram.

       

      You can think of two server groups existing :

      Server Group 1 - Server [1, 3, 5]     with either ha or full-ha, for our example let it be full-ha

      Server Group 2 - Server [2, 4]         with either ha or full-ha, for our example let it be ha

       

      Now for the purpose of clustering I would like the following happening :

      Server Group 1 mapping to Cluster  1

      Server Group 2 mapping to Cluster 2

       

      So when I say multiple, I mean Cluster 1 and Cluster 2 and when I say different, I mean that they can modeled after a different (but a variant of ha) profile with different applications loaded.

       

      On a non-cloud setup where UDP multicast is allowed my observation has been that when I deploy a "distributable" web application, I see that all the server JVMs [1, 2, 3, 4, 5] join a single cluster.

       

      So the main question is : What can I do to achieve my desired clustering without changing the socket-bindings on either profile used ?

       

      I understand that one can configure the profile for server groups in such as way each is given a unique multicast address so that we can limit which servers are discovered for clustering by configuring the  parameter: jboss.default.multicast.address 

      Domian Cluster.jpg

        • 1. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
          wdfink

          Use the system properties element inside the servergroup and set the variable for the jgroups address and port used in the socket configuration.

          • 2. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
            vbchin2

            Thanks Wolf-Dieter! So with your reply, are you saying that configuring the jboss.default.multicast.address is the only way to go in isolating clusters based on server groups ? I believe the answer is Yes but I rather have you confirm that.    

            • 3. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
              vbchin2

              Hi Wolf-Dieter,

               

              Perhaps you can answer another question of mine in addition to the one above. What if the scenario is changed a little bit and we are running the same setup in a cloud based environment where the UDP multicast is NOT permitted ? Lets assume that we are using TCPGOSSIP for discovery.

               

              Can a single GossipRouter handle group membership details for both Server-Group-1 and Server-Group-2 independently? I understand that we configure the GossipRouter per profile and if the both the server groups use the same profile they end up talking to the same GossipRouter and hence the question.

              • 4. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
                vbchin2

                Quick Update: I changed the following things

                 

                1. Default JGroups stack from UDP to TCP
                2. Added a GossipRouter to manage the group membership information
                3. Set the profile for both the server groups to : full-ha (which contained the IP and Port of the GossipRouter in jgroups subsystem
                4. Deployed a "distributable" web application across both the server groups

                 

                Expected Result : All the nodes of a given server group would form their own cluster

                Actual Result     : All the nodes under the entire domain became part of the cluster

                 

                Essentially saying that a single GossipRouter as configured for a given ha (or a variant of ha) profile, when it comes to clustering, does not distinguish nodes as belonging to seperate server-groups.

                • 5. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
                  rhusar

                  Vijay Bhaskar Chintalapati wrote:

                   

                  Thanks Wolf-Dieter! So with your reply, are you saying that configuring the jboss.default.multicast.address is the only way to go in isolating clusters based on server groups ? I believe the answer is Yes but I rather have you confirm that.    

                  Yes, thats the case. The problem is that separating on logical level implies a significant overhead of sending messages to members that are not using them. This leads to correct setup from the start.

                  • 6. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
                    vbchin2

                    Thanks much Radoslav! Could you also please suggest how in an environment where UDP multicast is NOTsupported and where TCPGOSSIP is used for discovery, we can achieve the same isolation of cluster nodes based on server-groups they belong to ?

                    • 7. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
                      rhusar

                      Vijay Bhaskar Chintalapati wrote:

                       

                      Thanks much Radoslav! Could you also please suggest how in an environment where UDP multicast is NOTsupported and where TCPGOSSIP is used for discovery, we can achieve the same isolation of cluster nodes based on server-groups they belong to ?

                      Hi again,

                       

                      I was trying to see what a solution is. You could start 2 separate Gossip Routers and point each cluster to their respective gossip router or configure cluster name for each cluster differently.

                       

                      In AS5 this can be isolated by changing the cluster name too.

                       

                      Message was edited by: Radoslav Husar

                      • 8. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
                        vbchin2

                        Not sure whether a) its me or b) whether you will agree with me when I say that, AS 7 in that sense (when it comes to clustering within a Domain Mode) is restrictive and doesn't allow the flexibility of clustering whatever nodes we feel like clustering as long as those nodes are a subset of all nodes sharing a common HA profile.

                         

                        If UDP multicast is allowed one has to change the default multicast port to be able to isolate the clusters (quite honestly, this isn't a big deal)

                         

                        AND WHEN

                         

                        UPD multicast is NOT allowed and when one uses TCPGOSSIP for easy scalability of the cluster, they have to necessarily use two GossipRouters when one is should have been enough and quite capable of handling membership information for two groups of cluster nodes.

                         

                        Can be not simply bring back the old Cluster Group name concept in AS 7 in Domain Mode as long as the nodes are a subset of all nodes sharing a common HA profile ?

                         

                        Thoughts

                        • 9. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
                          rhusar

                          Ah, sorry I forgot to update the answer.

                           

                          You need to change the cluster name like this for example:

                           

                                      <cache-container name="web" aliases="standard-session-cache" default-cache="repl" start="EAGER">
                                          <transport cluster="my-cluster-name" lock-timeout="60000"/>
                                          <replicated-cache name="repl" mode="ASYNC" batching="true">
                                              <file-store/>
                                          </replicated-cache>
                          

                           

                          This is fine since the cluster name serves only for discovery and no unnecessary messages are sent since you will use TCP.

                          • 10. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
                            vbchin2

                            Bravo!! Thanks so much Radoslav! I was able to parameterize the cluster name as cluster="${jboss.cluster.group.name}" (its my own parameter name), configure the vaule from System Properties at the server-group level and isolate the clustering.

                            • 11. Re: Achieving multiple and different clusters under a single Domain Mode setup in AS 7
                              rhusar

                              Cool! Thanks for the update.