Open In App

Configuring Clusters in Cassandra

Prerequisite – Monitoring cluster in Cassandra
In this article, we will discuss how we can configure clusters setting in cassandra.yaml file. Also, we will cover some basic parts of cassandra.yaml file in which we can change the by default setting as per our requirements.

Cluster :
In Cassandra, a cluster is a collection of a node. In a cluster, all nodes can communicate through gossip protocol and all nodes have a similar capability in a cluster. A node in the cluster contains keyspaces, tables, schema information, etc.




Cluster Configuration :



Common properties for Cluster Configuration :
The table below contains the common configurations like cluster name, listen_address, seeds, native transport address, etc.

Name Configuration Setting
cluster_name Default: “Test Cluster”
listen_address Default: localhost
native_transport_address Default: localhost
seeds Default: “127.0.0.1”


cluster_name :
In this configuration, you can change the name of the cluster in cassandra.yaml file. To change the configuration setting follow steps –

listen_address :
It is the IP address that is used by other nodes in a cluster to find out this node. To change the configuration setting follow steps –

native_transport_address :
It is an IP address that is used by the client to connect with the node or the cluster. To change the configuration setting follow steps –

seed address or seed addresses :
It is used when a new node joined the cluster. In general, all nodes in a cluster have the same seed list. To change the configuration setting follow steps –

Output –

seed_provider :
# Addresses of hosts that are deemed contact points.
# Cassandra nodes use this list of hosts to find each other and learn
# the topology of the ring. You must change this if you are running
# multiple nodes!

class_name : org.apache.cassandra.locator.SimpleSeedProvider

parameters :
# seeds is actually a comma-delimited list of addresses.
# Example - "<ip1>, <ip2>, <ip3>"

seeds : "127.0.0.1"


Example of Cluster Configuration :

Setting Node 1 Node 2 Node 3
IP address (External) 192.168.10.71 192.168.10.72 192.168.10.73
cluster_name DC1 DC1 DC1
listen_address 192.168.10.71 192.168.10.72 192.168.10.73
native_transport_address 192.168.10.71 192.168.10.72 192.168.10.73
seeds “192.168.10.71” “192.168.10.72” “192.168.10.73”

Article Tags :