5 Replies Latest reply on Feb 27, 2017 8:47 AM by wwang2016

    Is it possible to make a cluster of Wildfly 10 instances without using multicast

    wwang2016

      Hi,

       

      I was able to configure two wildfly instances as a cluster so that one instance is down, the other will automatically starts up. Basically, it is designed to support High Availability Singleton. In future, we might need to set up a true cluster environment.

       

      In the mean time, our network team asked me if it is possible to implement it it without using multicast communication. I checked the configuration file, and it is using multicast.

       

      In the following section:

      It looks like it is possible to set the channel to be tcp. However, I am not sure I can run the HA singleton in a network that does not support multicast since I can see multicast configuration in other part of the standalone-full-ha.xml

       

      <subsystem xmlns="urn:jboss:domain:jgroups:4.0">

                  <channels default="ee">

                      <channel name="ee" stack="udp"/>

                  </channels>

                  <stacks>

                      <stack name="udp">

                          <transport type="UDP" socket-binding="jgroups-udp"/>

                          <protocol type="PING"/>

                          <protocol type="MERGE3"/>

                          <protocol type="FD_SOCK" socket-binding="jgroups-udp-fd"/>

                          <protocol type="FD_ALL"/>

                          <protocol type="VERIFY_SUSPECT"/>

                          <protocol type="pbcast.NAKACK2"/>

                          <protocol type="UNICAST3"/>

                          <protocol type="pbcast.STABLE"/>

                          <protocol type="pbcast.GMS"/>

                          <protocol type="UFC"/>

                          <protocol type="MFC"/>

                          <protocol type="FRAG2"/>

                      </stack>

                      <stack name="tcp">

                          <transport type="TCP" socket-binding="jgroups-tcp"/>

                          <protocol type="MPING" socket-binding="jgroups-mping"/>

                          <protocol type="MERGE3"/>

                          <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>

                          <protocol type="FD"/>

                          <protocol type="VERIFY_SUSPECT"/>

                          <protocol type="pbcast.NAKACK2"/>

                          <protocol type="UNICAST3"/>

                          <protocol type="pbcast.STABLE"/>

                          <protocol type="pbcast.GMS"/>

                          <protocol type="MFC"/>

                          <protocol type="FRAG2"/>

                      </stack>

                  </stacks>

              </subsystem>

       

       

      Other part of the configuration file such as the following are associated with multicast

       

          <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

              <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>

              <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9993}"/>

              <socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>

              <socket-binding name="http" port="${jboss.http.port:8080}"/>

              <socket-binding name="https" port="${jboss.https.port:8443}"/>

              <socket-binding name="iiop" interface="unsecure" port="3528"/>

              <socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>

              <socket-binding name="jgroups-mping" interface="private" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>

              <socket-binding name="jgroups-tcp" interface="private" port="7600"/>

              <socket-binding name="jgroups-tcp-fd" interface="private" port="57600"/>

              <socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>

              <socket-binding name="jgroups-udp-fd" interface="private" port="54200"/>

              <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>

              <socket-binding name="txn-recovery-environment" port="4712"/>

              <socket-binding name="txn-status-manager" port="4713"/>

              <socket-binding name="messaging" port="5445"/>

              <socket-binding name="messaging-backup" port="5446"/>

              <outbound-socket-binding name="mail-smtp">

                  <remote-destination host="localhost" port="25"/>

              </outbound-socket-binding>

          </socket-binding-group>

       

       

      Regards,

       

      Wayne

        • 1. Re: Is it possible to make a cluster of Wildfly 10 instances without using multicast
          rhusar

          Absolutely. Multicast-based discovery is the default configuration but you can easily remove it.

           

          To use pure TCP-based jgroups communication, switch the default stack to "tcp" and replace the MPING (multicast-based discovery protocol) with one that suits your needs from the list: Chapter 7. List of Protocols, e.g. you might want to use TCPPING with a static list of initial members.

           

          Looking at the socket-binding-groups, the only other binding making use of multicast is mod_cluster, which you can remove if you are not using or switch to static discovery as well by removing the advertise socket binding.

          • 2. Re: Is it possible to make a cluster of Wildfly 10 instances without using multicast
            wwang2016

            Hi Radoslav,

             

            Thanks for you quick reply!

             

            I also configured High Availability for messaging in a HA singleton scenario where two wildfly 10 instances are set up. Not only the down of one instance will alert the other standby instance to start up, it will also pick up un-processed messages from the wildfly instance (that is down), and continue to process the messages until completion.

             

            Could switching from UDP/multicast to TCP based discovery impact this aspect of the clustering?

             

            Thanks,

             

            Wayne

            • 3. Re: Is it possible to make a cluster of Wildfly 10 instances without using multicast
              pferraro

              wwang2016 Switching discovery implementations will not impact the functionality of your messaging setup.

              • 4. Re: Is it possible to make a cluster of Wildfly 10 instances without using multicast
                atchijov-vgw

                This works for us in AWS:

                <subsystem xmlns="urn:jboss:domain:jgroups:4.0">

                        <channels default="ee">

                                <channel name="ee" stack="tcp"/>

                        </channels>

                        <stacks>

                                <stack name="tcp">

                                        <transport type="TCP" socket-binding="jgroups-tcp"/>

                                        <protocol type="JDBC_PING">

                                                <property name="connection_url" >

                                                        ...

                                                </property>

                                                <property name="connection_username" >

                                                        ...

                                                </property>

                                                <property name="connection_password" >

                                                        ..

                                                </property>

                                                <property name="connection_driver" >

                                                        ...

                                                </property>

                                        </protocol>

                                        <protocol type="MERGE3"/>

                                        <protocol type="FD_SOCK" socket-binding="jgroups-tcp-fd"/>

                                        <protocol type="FD"/>

                                        <protocol type="VERIFY_SUSPECT"/>

                                        <protocol type="pbcast.NAKACK2"/>

                                        <protocol type="UNICAST3"/>

                                        <protocol type="pbcast.STABLE"/>

                                        <protocol type="pbcast.GMS"/>

                                        <protocol type="MFC"/>

                                        <protocol type="FRAG2"/>

                                </stack>

                        </stacks>

                </subsystem>

                 

                 

                 

                 

                                                                                                                                                                                                                                            ...                                                                                                                                   ...                                                                                                                                   ..                                                                                                                                   ...                                                                                                                                                                                                                                                                                                                                                                                                                 
                • 5. Re: Is it possible to make a cluster of Wildfly 10 instances without using multicast
                  wwang2016

                  Thanks to all of you!

                   

                  I will test it once we have made decision to switch to tcp

                   

                  Wayne