This documentation is for older WSO2 products. View documentation for the latest release.
Page Comparison - Clustering Cassandra in a Distributed Setup (v.1 vs v.6) - Clustering Guide 4.2.0 - WSO2 Documentation

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

You can create a Cassandra cluster using Storage Server nodes.

Axis2 clustering configurations

First you have to enable Axis2 clustering in each SS node. Change following configurations in the <SS_HOME>/repository/conf/axis2/axis2.xml file.

...

  • Set the membership scheme to WKA.
    <parameter name="membershipScheme">wka</parameter>
     
  • Set local member host.
    <parameter name="localMemberHost">192.168.1000.101<2</parameter>
     
  • Set local member port.
    <parameter name="localMemberPort">4001<>4000</parameter>
     
  • Set the well known members.

    Code Block
    languagehtml/xml
    <members>
                <member>
                    <hostName>192.168.1000.101<2</hostName>
                    <port>4000</port>
                </member>
                <member>
                    <hostName>192.168.1000.102<3</hostName>
                    <port>4001</port>
                </member>
                <member>
                    <hostName>127<hostName>192.0168.0.1<4</hostName>
                    <port>4002</port>
                </member>
    </members>
    Info

    Here, you have to list all SS nodes with their localMemberHost and localMemberPort values, which you already configured in previous steps.

Cassandra connection related configurations

  1. Update the <SS_HOME>/repository/conf/etc/hector-config.xml in any node you plan to use as management node. Use the following configuration:

    Code Block
    languagehtml/xml
    <HectorConfiguration>
        <Cluster>
            <Name>ClusterOne</Name>
            <Nodes>192.168.0.2:9160,192.168.0.3:9160,192.168.0.34:9160</Nodes>
            <AutoDiscovery disable="true" delay="1000"/>
        </Cluster>
    </HectorConfiguration>
    Info

    Give all SS nodes with port 9160 as a comma separated list.

  2. Configure <SS_HOME>/repository/conf/etc/cassandra-endpoint.xml as follows by giving all host names of nodes.

    Code Block
    languagehtml/xml
    <Cassandra>
     <EndPoints>
        <EndPoint>
            <HostName>css0.stratoslive.wso2.com</HostName>
        </EndPoint>
        <EndPoint>
            <HostName>css1.stratoslive.wso2.com</HostName>
        </EndPoint>
        <EndPoint>
            <HostName>css2.stratoslive.wso2.com</HostName>
        </EndPoint>
     </EndPoints>
    </Cassandra>

Cassandra Cluster Monitoring and Node Operations related configurations

To view Cassandra cluster statistics and do cluster operations, <SS_HOME>/repository/conf/etc/cluster-config.xml needs to be configured. Here, all the SS nodes and their service URLs needs to be configured.

Code Block
languagehtml/xml
<cluster>
    <configuration>
        <cluster_authentication>
            <username>admin</username>
            <password>admin</password>
        </cluster_authentication>
        

...

<nodes>
            <node>
                <host>192.168.0.2</host>
                <backend_url>https://192.168.0.2:9443/services/</backend_url>
            </node>
            <node>
                <host>192.168.0.3</host>
                

...

<backend_url>https://192.168.0.3:9443/services/</backend_url>
            </

...

node>
            <node>
                <host>192.168.0.4</host>
       

...

         

...

<backend_url>https://192.168.0.4:9443/services/</backend_url>
            </node>
        </

...

nodes>
    </

...

configuration>
</

...

cluster>