Set up Multi – node Cassandra3.6 Cluster on Ubuntu 16.04

In the below example i’m using 3 nodes with the below IP’s.Each of them have Single node cassandra cluster already set up in it.

Node1: 172.16.167.176
Node2: 172.16.167.132
Node3: 172.16.167.185

Through the below simple steps im trying to set up the nodes to function as a multi node cassandra cluster so please run the below steps in all of your available nodes in your cluster.

   Step1:Stop Cassandra daemon & delete the default data set
     $ sudo service cassandra stop
     $ sudo rm -rf /var/lib/cassandra/data/system/*   
   Step2:COnfigure the cassandra cluster using the configuration file
   
   $ sudo vim  /etc/cassandra/cassandra.yaml
   
   cluster_name: 'CassandraDOCluster'
   
   seed_provider:
  - class_name: org.apache.cassandra.locator.SimpleSeedProvider
    parameters:
         - seeds: "172.16.167.176,72.16.167.132,72.16.167.185"
  listen_address: 172.16.167.176
  rpc_address: 172.16.167.176
  endpoint_snitch: GossipingPropertyFileSnitch
  auto_bootstrap: false
   Step3:Start cassndra server & check status
   $ sudo service cassandra start
   $ sudo nodetool status   

imageStep4:Log into your node’s CQL console and try make some changes in your Db tables just to check those changes are reflecting in your other nodes too. $ cqlsh 172.16.167.176 9042

You are done.
Note: You can log into the CQL console and check the db changes you makes are reflecting in your other nodes instantly.


Leave a Reply

Your email address will not be published. Required fields are marked *