1 Reply Latest reply on Oct 1, 2016 8:24 AM by rhusar

    wildfly clustering - servergroups, channels, port offset

    jjakub

      1) Which part of configuration is responsible for clustering ?

       

      Lets say I have 2 hosts, each with 2 jboss servers, one on default ports, one run with portoffset 10000, all in server group sgA.

      I deploy to isgA an application clusterable.war with <distributable/> in web.xml.

       

      2) By default all 4 servers will create cluster, isn't it ?

       

      Now I create server group sgB, with next 2 servers on each host, run with portoffset 20000 and portoffset 30000.

      I deploy clusterable.war to sgB

       

      3) By default all 8 servers will crate one cluster, isn't it ?

       

      https://docs.jboss.org/author/display/WFLY9/High+Availability+Guide#HighAvailabilityGuide-SubsystemSupport

      states :

      The JGroups subsystem provides group communication support for HA services in the form of JGroups channels.

      Named channel instances permit application peers in a cluster to communicate as a group and in such a way that the communication satisfies defined properties (e.g. reliable, ordered, failure-sensitive). Communication properties are configurable for each channel and are defined by the protocol stack used to create the channel. Protocol stacks consist of a base transport layer (used to transport messages around the cluster) together with a user-defined, ordered stack of protocol layers, where each protocol layer supports a given communication property.

      JGroups channels are created transparently as part of the clustering functionality (e.g. on clustered application deployment, channels will be created behind the scenes to support clustered features such as session replication or transmission of SSO contexts around the cluster).

       

      4) How can I force sgA and sgB not create one common cluster, but two separate clusters ?

      5) To make sgA and sgB create two separate clusters, should I create two separate infinispan stacks for them ? Which property should differ in each stack ? How do I link servergroup to each stack ?

      6) Does port offset has no influence on clustering ? Appearently not, because even started with different port offset servers by default create one cluster. So what determines a cluster ? Is there something like cluster name a servergroup belongs to ? Where and how is it defined and referenced ?

       

      Regards

      Jakub

        • 1. Re: wildfly clustering - servergroups, channels, port offset
          rhusar

          1) Which part of configuration is responsible for clustering ?

          It is the infinispan and jgroups subsystems.

           

          2) By default all 4 servers will create cluster, isn't it ?

          Yes, as long as they can communicate over the same UDP multicast group.

           

          4) How can I force sgA and sgB not create one common cluster, but two separate clusters ?

          Use different multicast groups.

           

          5) To make sgA and sgB create two separate clusters, should I create two separate infinispan stacks for them ? Which property should differ in each stack ? How do I link servergroup to each stack ?

          You can use the same profile but make the multicast group and expression and pass 2 values for each cluster/server-group.

           

          6) Does port offset has no influence on clustering ? Appearently not, because even started with different port offset servers by default create one cluster. So what determines a cluster ? Is there something like cluster name a servergroup belongs to ? Where and how is it defined and referenced ?

          Port offset only affects the port value in socket-binding-group configuration section, multicast and fixed ports are not offsetted.

          1 of 1 people found this helpful