2 Replies Latest reply on Aug 24, 2014 4:26 PM by pferraro

    How do you set the jgroups group name?

    electricsam

      I work in an environment were there could potentially be hundreds of wildfly clusters running on the same network.  I've read that clustering uses multicasting to find and communicate with group members. I've read that setting the JGroups group name will filter messages.

       

      I'd like to be able to set the group name unique to each cluster as a safety measure in case the multicast addresses collide.

       

      I haven't been able to find an recent documentation on how to do this.  Can someone help?

        • 1. Re: How do you set the jgroups group name?
          belaban

          There are many ways to separate clusters

          • Depending on where you run, use a small UDP.ip_ttl. E.g. a value of 0 means that multicast doesn't leave the local box
          • Use a different cluster name, as you mentioned. This is done in JChannel.connect(cluster_name). The cluster name has to be set in WildFly's configuration
          • Use a different UDP.mcast_addr and/or mcast_port
          • Bind to a different network interface (bind_addr or -Djgroups.bind_addr)
          • 2. Re: How do you set the jgroups group name?
            pferraro

            As far as how to specify the cluster name in your WildFly configuration, this is done via the Infinispan subsystem.

            e.g.

            <cache-container name="web">
               <transport cluster="cluster-name"/>
            </cache-container>
            

            When unspecified, the cluster name defaults to the cache container name.

             

            This will change in WF9.  JGroups channels will be explicitly defined in the jgroups subsystem, making the task of overriding default cluster names a bit more obvious.

             

            In general, isolating clusters based solely on cluster names is not a good idea, since a node will receive messages from other clusters and have to filter based on name.  Instead, as Bela suggested, using unique multicast address/port combinations is the way to go.