7 Replies Latest reply on Jun 25, 2004 1:22 PM by pedrosalazar

    How to easily separate clusters from each other?

    marlig

      Hi,

      we have, in the same sub-net, several environments (dev, test, ...), where each of them consists of two cluster-instances. Apparently, they see and influence each other. Especially the load-balanced clients get all IPs of all instances, not just the two they are supposed to connect to.

      What would be the easiest way to separate these clusters? Would it be enough to change the mcast_port in cluster-service.xml?

      Thanks

        • 1. Re: How to easily separate clusters from each other?
          pedrosalazar

          Greetings,

          I'm looking for the same answer, but I try to add more to the question:

          Besides the ip multicast, the "partition name" in cluster-service.xml has any effect?

          regards,
          Pedro Salazar.

          • 2. Re: How to easily separate clusters from each other?
            darranl

            Personally I prefer to change the multicast address as it splits up the clusters by making one configuration change.

            If you change the partition name there are other configuration files that refer to the partition name that will also need to be changed.

            I don't have the list of files that would need changing but if you search these forums the list has been discussed quite a few times in the past.

            • 3. Re: How to easily separate clusters from each other?
              jiwils

               

              "darranl" wrote:
              I don't have the list of files that would need changing but if you search these forums the list has been discussed quite a few times in the past.


              The list of files for JBoss 3.2.4 based on the "all" configuration is:

              * deploy/cluster-service.xml
              * deploy/jbossha-httpsession.sar/ClusteredHttpSessionEB.jar/META-INF/jboss.xml
              * deploy/deploy-hasingleton-service.xml

              You can search for "DefaultPartition" and find what you need to change, but do not do a global replace. You only need to change this setting where it describes the name of the partition not the DefaultPartition itself.

              We use system property substitution in all of these places (we use something like ${partition.name} in the files in place of the partition name) so that we can specify the name of the partition as a system property on the command line. This makes it a "one setting" change for us as well.

              • 4. Re: How to easily separate clusters from each other?
                pedrosalazar

                Hi,

                so, in my understanding we have 2 options for having a jboss in cluster:

                1. changing the ip_multicast and/or port for JGROUPS and AutoDiscovery

                2. changing the PartitionName.

                It's obvious that the alternative 1) is more simpler than number 2). So, when does the alternative 2) makes sense to use?

                thanks,
                Pedro Salazar.

                • 5. Re: How to easily separate clusters from each other?
                  slaboure

                  when you get paid by the hour ;)

                  Cheers,


                  sacha

                  P.S.: or when you need two partitions for the SAME node, you need two different name to reference them, but in that case you ALSO need to change the multicast IP

                  • 6. Re: How to easily separate clusters from each other?
                    jiwils

                     

                    "pedrosalazar" wrote:
                    It's obvious that the alternative 1) is more simpler than number 2). So, when does the alternative 2) makes sense to use?


                    I am not sure that alternative 2 is really that much harder to "implement" (once you know what files to change), but it does mean that you have to specify the partition name for your clustered EJBs in their jboss.xml descriptor as well since they will use "DefaultPartition" for the partition name if one is not specified. It would be nice if this "default" could be set as well so that the assumed partition name would be what we set the partition name to be upon startup, but that is another topic...

                    For us, alternative 2 made sense because if you change the multicast IP/port, you have to keep up with that information so you do not have two configurations clobbering each other. It is true that you have to keep up with the various partition names (as opposed to ip/port information) with this alternative, but we already had a mechanism that could do that (our clusters already have a naming convention).

                    In the future, we may use both methods in order to get the best configuration across all of our clusters.

                    • 7. Re: How to easily separate clusters from each other?
                      pedrosalazar

                      For the client perspective, changing the PartitionName will affect directly the normal way of invoking an EJB for instance. Below, I have a sample of jndi.properties (provider.url is commented):

                      # jndi.properties
                      
                      java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
                      java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
                      #java.naming.provider.url=localhost:1099
                      jnp.partitionName=DefaultPartition
                      


                      In this perspective, changing the "PartitionName" in my jboss cluster configuration will affect the clients (they need to change the partition name property). But, if I change only the ip_multicast and/or port, how can I decide which cluster I want to invoke if I have 2 groups of clusters in my network?

                      thanks,
                      Pedro Salazar

                      P.S.- I don't get paid by the hour ;-)