Create a Scylla Cluster - Single Data Center (DC)

Prerequisites

  • Make sure that all the ports are open.
  • Obtain the IP addresses of all nodes which have been created for the cluster.
  • Select a unique name as cluster_name for the cluster (identical for all the nodes in the cluster).
  • Decide which nodes will be the seed nodes (It is recommended to define more than one node as a seed node).
  • Choose which snitch to use (identical for all the nodes in the cluster). For a production system, it is recommended to use a DC-aware snitch, which can support a NetworkTopologyStrategy replication-strategy for your Keyspaces.

Procedure

These steps need to be done for each of the nodes in the new cluster.

1. Install Scylla on a node, see Getting Started for further instructions. Follow the Scylla install procedure up to scylla.yaml configuration phase.

In case that the node starts during the process follow these instructions

2. In the scylla.yaml file edit the parameters listed below. The file can be found under /etc/scylla/

  • cluster_name - Set the selected cluster_name
  • seeds - Set the selected seed nodes
  • listen_address - IP address that Scylla used to connect to other Scylla nodes in the cluster
  • auto_bootstrap - By default, this parameter is set to true, it allows new nodes to migrate data to themselves automatically.
  • endpoint_snitch - Set the selected snitch
  • rpc_address - Address for client connection (Thrift, CQL)

3. This step needs to be done only if using GossipingPropertyFileSnitch. In the cassandra-rackdc.properties file edit the parameters listed below. The file can be found under /etc/scylla/

  • dc - Set the datacenter name
  • rack - Set the rack name

For example:

# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=thedatacentername
rack=therackname
# prefer_local=<false | true>
# dc_suffix=<Data Center name suffix, used by EC2SnitchXXX snitches>
  1. After Scylla has been installed and configured edit scylla.yaml file on all the nodes, start the seed nodes one at a time, and then start the rest of the nodes in the cluster using

CentOS, RHEL or Ubuntu 16.04

sudo systemctl start scylla-server

Ubuntu 14.04 or Debian

sudo service scylla-server start

5. Verify that the node has been added to the cluster using nodetool status

Example

This example shows how to install and configure a three nodes cluster, using two seed nodes, and using GossipingPropertyFileSnitch as the endpoint_snitch, each node on a different rack.

  1. Installing Three Scylla nodes the IP’s are:
192.168.1.201 (seed)
192.168.1.202
192.168.1.203 (seed)
  1. In each Scylla node, edit the scylla.yaml file

192.168.1.201

cluster_name: 'Scylla_cluster_demo'
seeds: "192.168.1.201,192.168.1.203"
endpoint_snitch: GossipingPropertyFileSnitch
rpc_address: "192.168.1.201"
listen_address: "192.168.1.201"

192.168.1.202

cluster_name: 'Scylla_cluster_demo'
seeds: "192.168.1.201,192.168.1.203"
endpoint_snitch: GossipingPropertyFileSnitch
rpc_address: "192.168.1.202"
listen_address: "192.168.1.202"

192.168.1.203

cluster_name: 'Scylla_cluster_demo'
seeds: "192.168.1.201,192.168.1.203"
endpoint_snitch: GossipingPropertyFileSnitch
rpc_address: "192.168.1.203"
listen_address: "192.168.1.203"

3. This step needs to be done only if using GossipingPropertyFileSnitch. In each Scylla node, edit the cassandra-rackdc.properties file

192.168.1.201

# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=datacenter1
rack=rack43
# prefer_local=<false | true>
# dc_suffix=<Data Center name suffix, used by EC2SnitchXXX snitches>

192.168.1.202

# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=datacenter1
rack=rack44
# prefer_local=<false | true>
# dc_suffix=<Data Center name suffix, used by EC2SnitchXXX snitches>

192.168.1.203

# cassandra-rackdc.properties
#
# The lines may include white spaces at the beginning and the end.
# The rack and data center names may also include white spaces.
# All trailing and leading white spaces will be trimmed.
#
dc=datacenter1
rack=rack45
# prefer_local=<false | true>
# dc_suffix=<Data Center name suffix, used by EC2SnitchXXX snitches>
  1. Starting Scylla nodes, since our seeds nodes are 192.168.1.201 and 192.168.1.203 we will start them first, after that we can start 192.168.1.202

CentOS, RHEL or Ubuntu 16.04

sudo systemctl start scylla-server

Ubuntu 14.04 or Debian

sudo service scylla-server start
  1. Verify that the node has been added to the cluster by using the nodetool status command
Datacenter: datacenter1
Status=Up/Down
State=Normal/Leaving/Joining/Moving
--  Address        Load       Tokens  Owns (effective)                         Host ID         Rack
UN  192.168.1.201  112.82 KB  256     32.7%             8d5ed9f4-7764-4dbd-bad8-43fddce94b7c   43
UN  192.168.1.202  91.11 KB   256     32.9%             125ed9f4-7777-1dbn-mac8-43fddce9123e   44
UN  192.168.1.203  124.42 KB  256     32.6%             675ed9f4-6564-6dbd-can8-43fddce952gy   45