This documentation is for older WSO2 products. View documentation for the latest release.
Clustering Cassandra - Clustering Guide 4.2.0 - WSO2 Documentation
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

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.

  • Enable Hazelcast-based Axis2 clustering.
    <clustering class="org.wso2.carbon.core.clustering.hazelcast.HazelcastClusteringAgent" enable="true">
  • Set the membership scheme to WKA.
    <parameter name="membershipScheme">wka</parameter>
     
  • Set local member host.
    <parameter name="localMemberHost">192.168.100.101</parameter>
     
  • Set local member port.
    <parameter name="localMemberPort">4001</parameter>
     
  • Set the well known members.

    <members>
                <member>
                    <hostName>192.168.100.101</hostName>
                    <port>4000</port>
                </member>
               <member>
                    <hostName>192.168.100.102</hostName>
                    <port>4001</port>
                </member>
                <member>
                    <hostName>127.0.0.1</hostName>
                    <port>4002</port>
                </member>
    </members>

    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:

    <HectorConfiguration>
        <Cluster>
            <Name>ClusterOne</Name>
            <Nodes>192.168.0.3:9160,192.168.0.3:9160</Nodes>
            <AutoDiscovery disable="true" delay="1000"/>
        </Cluster>
    </HectorConfiguration>

    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.

    <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>
        <EndPoint>
            <HostName>css3.stratoslive.wso2.com</HostName>
        </EndPoint>
        <EndPoint>
            <HostName>css4.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.

<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>
        </nodes>
    </configuration>
</cluster>
  • No labels