Initializing a multiple node cluster (single datacenter)
A deployment scenario for a DataStax Distribution of Apache Cassandra 3.11 cluster with a single datacenter.
This topic contains information for deploying a DataStax Distribution of Apache Cassandra™ (DDAC) cluster with a single datacenter. If you're new to Cassandra, and haven't set up a cluster, see Planning and testing cluster deployments.
cassandra.yaml
- The cassandra.yaml file is located in the installation_location/conf directory.
cassandra-rackdc.properties
- The cassandra-rackdc.properties file is located in the installation_location/conf directory.
Prerequisites
- A good understanding of how Cassandra works. At minimum, be sure to read Understanding the database architecture, especially the Data replication section, and Cassandra's rack feature.
- Install Cassandra on each node.
- Choose a name for the cluster.
- Get the IP address of each node.
- Determine which nodes will be seed nodes. Do not make all nodes seed nodes. Please read Internode communications (gossip).
- Determine the snitch and replication strategy. The GossipingPropertyFileSnitch and NetworkTopologyStrategy are recommended for production environments.
- Determine a naming convention for each rack. For example, good names are RAC1, RAC2 or R101, R102.
- The cassandra.yaml configuration file, and property files such as cassandra-rackdc.properties, give you more configuration options. For more information, see Configuration.
This example describes installing a 6 node cluster spanning 2 racks in a single datacenter. Each node is already configured to use the GossipingPropertyFileSnitch and 256 virtual nodes (vnodes).
In Cassandra, datacenter is synonymous with replication group. Both terms refer to a set of nodes configured as a group for replication purposes.
Procedure
Results
DC: Cassandra
==============================================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 110.82.155.0 21.33 KB 256 50.2% a9fa31c7-f3c0-... RAC1
UN 110.82.155.1 21.33 KB 256 49.8% f5bb416c-db51-... RAC1
DC: Cassandra2
==============================================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 110.54.125.1 21.33 KB 256 16.7% b836748f-c94f-... RAC2
UN 110.55.120.1 21.33 KB 256 16.7% b354798g-c94f-... RAC2
The output should list each node, and show its status as
UN
(Up Normal).