Database Reference
In-Depth Information
In this section, we will discuss multiple Cassandra node configurations over a single
machine and over Amazon EC2 instances. Reasons to choose AWS EC2 instances in-
clude the setup of the Cassandra cluster over the cloud and the set up on the local box
to configure the Cassandra cluster over physical boxes. AWS based configuration
would educate users about AWS and Cassandra.
Configuring Multiple Nodes over a Single Machine
Configuring multiple nodes over a single machine is more of an experiment, as with a
production application you would like to configure a Cassandra cluster over multiple
Cassandra nodes. Setting up multinode clusters over a single machine or multiple ma-
chines is similar. That's what we will be covering in this sample exercise. In this ex-
ample, we will configure 3 nodes (127.0.0.2-4) on a single machine.
1.
We need to map hostnames to IP addresses.
a.
In Windows and Linux OS, these configurations are available in
etc/hosts (Windows) or /etc/hosts (Linux) files. Modify the config-
uration file to add the above-mentioned 3 node configuration as:
127.0.0.1 127.0.0.2
127.0.0.1 127.0.0.3
127.0.0.1 127.0.0.4
b.
For Mac OS, we need to create those aliases as:
sudo ifconfig lo0 alias 127.0.0.2 up
sudo ifconfig lo0 alias 127.0.0.3 up
sudo ifconfig lo0 alias 127.0.0.4 up
2.
Unzip the downloaded Cassandra tarball installation in 3 different
folders (one for each node). Assign each node an identical
cluster_name as:
# The name of the cluster. This is mainly
used to prevent machines in
# one logical cluster from joining another.
cluster_name: 'Test Cluster'
Search WWH ::




Custom Search