How Do I Configure DYNAMIC Clustering?

Yellowfin FAQ shared this question 6 years ago
Answered

I want to configure JGroups for my Yellowfin clustering. As an example, UDP Multicast will not work for my network.

How do I configure JGroups?

Replies (3)

photo
1

Please start by reviewing our Clustering Guide, attached.

Yellowfin DYNAMIC mode clustering uses JGroups to establish the cluster and dynamically add or remove members accordingly.

By default, this configuration uses UDP Multicast to identify members of the cluster.

It's possible to configure JGroups in a multitude of ways. The most common are related to IP version or protocol used for member identification. One can provide a configuration xml to the cluster configuration in order to completely customize your JGroups configuration as per their documentation here.

First, you'll want a nice template for your configuration. You can look inside the jgroups jar file, located in <YellowfinInstall>/appserver/webapps/ROOT/WEB-INF/lib. In my case, it's jgroups-3.6.11.Final.jar, as per 7.4 build 20180104.

Here you will find a plethora of xml files. As an example, if you plan on using TCP instead of UDP you can pull out the 'tcp.xml' file. The comment in the top of the XML provides valuable info when implementing the configuration.

In this example, I've edited the provided template and renamed it yfjgroups.xml. You can view an example attached. As stated in the comment, it's imperative when not using multicast that one declare the bind address and the initial hosts group. I've done so in the file directly, however this can also be accomplished in setting the Java_OPTS for catalina in Catalina.bat/Catalina.sh or via the Windows service parameters.

Now, simply declare the Configuration file within the web.xml cluster settings. Here's an example excerpt:

  <!-- Cluster Management -->
  <servlet>
    <servlet-name>ClusterManagement</servlet-name>
    <servlet-class>com.hof.mi.servlet.ClusterManagement</servlet-class>
    <init-param>
        <param-name>ClusterType</param-name>
        <param-value>DYNAMIC</param-value>
    </init-param>
    <init-param>
        <param-name>SerialiseWebserviceSessions</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>CheckSumRows</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>EncryptSessionId</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>EncryptSessionData</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>AutoTaskDelegation</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>SessionReplication</param-name>
        <param-value>true</param-value>
    </init-param>
    <init-param>
        <param-name>BroadcastConfiguration</param-name>
        <param-value>FILE:/opt/Yellowfin/appserver/webapps/ROOT/WEB-INF/lib/yfjgroups.xml</param-value>
    </init-param>
    <load-on-startup>11</load-on-startup>
  </servlet>

The 'BroadcastConfiguration' parameter allows you to point to the provided configuration file and tell JGroups how you'd like it to behave.

Hope this helps!

Thanks,

Ryan

photo
1

Hi Ryan

This is helpful,

Can you also share details about REPOSITORY discovery way of doing clustering.

Thanks -Mayur

photo
1

Hi Mayur,

Information on REPOSITORY mode can be found here.

Thanks,

Ryan

Replies have been locked on this page!