You configure a Cassandra cluster by editing the /etc/cassandra/conf/cassandra.yaml configuration file available on each Cassandra node.
Repeat the following steps on every Cassandra node that you want to join to a cluster.
Verify that you have enabled client communication with Cassandra over SSL. For more information, see Enable Server and Client Communication with Cassandra over SSL.
- Set the
seeds_providervalue to list the IP addresses of the Cassandra cluster nodes. Use commas to separate the IP addresses.
seed_provider: # Addresses of hosts that are deemed contact points. # Cassandra Nodes use this list of hosts to find each other and learn # The Rerminology 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 #Ex: "<ip1>,<ip2>,<ip3>" - seeds: "ip-Cassandra-node-1,ip-Cassandra-node-2,ip-Cassandra-node-3"
- Save the changes and exit the file.
- Restart the Cassandra node by running the following command.
# systemctl restart cassandra
- Verify that the node is operational by running the following command.
Repeat this step for each Cassandra node before you proceed.
# nodetool status
If the Cassandra node is operational, the system returns the following information:
Datacenter:Datacenter-Name ======================= Status=Up/Down |/State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns (effective) Host ID Rack UN Node-IP-Address 190.68 KB 256 100.0% 9c428c6f-e792-4125-8f4c-1c88dae82ebb rack-name
- After the
seeds_providervalue is properly configured on all nodes, verify that all nodes in the Cassandra cluster are communicating with each other as expected.
# nodetool status
A successful cluster configuration returns the following status:
Datacenter:Datacenter-Name ======================= Status=Up/Down |/State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns (effective) Host ID Rack UN Node-IP-Address1 213.07 KB 256 66.5% 9c428c6f-e792-4125-8f4c-1c88dae82ebb rack-name UN Node-IP-Address2 203.85 KB 256 67.5% cael3946-04a5-4f3a-8225-842850dbe607 rack-name UN Node-IP-Address3 156.22 KB 256 66.0% f5ee3d7b-e83f-4fa7-b609-dea989b2b415 rack-name