Contents

Popular

To avoid a single point of failure, Cassandra server can be run on each server machine (AMS and AGS), thereby Cassandra servers acting as a cluster.

To set up the Cassandra cluster, perform the following actions:

  1. Open Cassandra.yaml file and specify the below:
    1. cluster_name: Give a name for the cluster.

      Icon

      All nodes must use the same cluster name.

    2. seeds: Mention the IP address of each node in the cluster, separated by commas. 

      Example

      Icon

      192.168.3.32,192.168.4.25,192.168.4.55

    3. listen_address: This is the IP address that other nodes in the cluster will use to connect. By default, the value will be "localhost" which canneeds to be changed to the IP address of the node.

      Example

      Icon

      listen_address: 192.168.1.74

    4. rpc_address: This is the IP address for remote procedure calls. The default value is "localhost". If the server's hostname is properly configured, leave this as is. It can be replaced with the server's IP address or the loopback address (127.0.0.1).

      Example

      Icon

      rpc_address: 192.168.1.74

    5. endpoint_snitch: Set the value to "GossipingPropertyFileSnitch".

      Icon

      endpoint_snitch: GossipingPropertyFileSnitch

  2. Open the cassandra-rackdc.properties file and specify the Data Center and Rack names:

    Example

    Icon

    dc=dc1
    rack=rack1 

  3. Open the cassandra-topology.properties file.
    Under the Cassandra Node IP address, specify the IP address of the node to the respective Rack and Data center.

    Example

    Icon

    192.168.1.73=DC1:RAC1
    192.168.1.74=DC1:RAC1

  4. Start the Cassandra server on every node in the cluster using the command below:

  5. Set Replication Factor using the command below:

    If Cassandra servers are running on the same Data Center
    If Cassandra servers are running on a different Data Center
    Icon

    The replication factor should be set on each node and must be equal to the number of Cassandra servers running.

  6. After Replication factor is set, run the nodetool repair command below in every node in the cluster:

  7. By this, the cluster setup must be ready. To check the status of a particular node, run the nodetool status command below:

If Cassandra server is running, stop the server and clear the data:

Icon

 

  1. Stop Cassandra:

  2. Clear the data:

 

Adaptavist ThemeBuilder EngineAtlassian Confluence