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. When creating new cluster, it is recommended to set this parameter to false
  • endpoint_snitch - Set the selected snitch
  • rpc_address - Address for client connection (Thrift, CQL)
  1. After Scylla has been installed and configured then 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

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

For example:

This example shows how to install and configure a three nodes cluster, using two seed nodes.

  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"
  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: DC1
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   B1
UN  192.168.1.202  91.11 KB   256     32.9%             125ed9f4-7777-1dbn-mac8-43fddce9123e   B1
UN  192.168.1.203  124.42 KB  256     32.6%             675ed9f4-6564-6dbd-can8-43fddce952gy   B1