Database Reference
In-Depth Information
3.
We should hold identical seeds on each node in the cluster. These are
used just to initiate gossip protocol among nodes in the cluster. Con-
figure seeds in
cassandra.yaml
as :
seed_provider:
# Addresses of hosts that are deemed
contact points.
# Cassandra nodes use this list of hosts
to find each other and learn
# the topology 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: "
127.0.0.2
"
4.
Change the
listen_address
and
rpc_address
configurations
for 127.0.0.2, 127.0.0.3, and 127.0.0.4 IP addresses in each
cas-
sandra.yaml
file. Since all 3 nodes are running on the same ma-
chine, change the
rpc_address
to 9160, 9161, and 9162 for each
respectively.
5.
Here we have an option to choose between 1 token per node or mul-
tiple tokens per node. Cassandra 1.2 introduced the “Virtual nodes”
feature which allows assigning a range of tokens on a node. We will
discuss Virtual nodes in coming chapter. Change the
ini-
tial_token
to
empty
and keep
num_tokens
as 2 (recommend
is 256).
6.
Next is to assign different JMX_PORT (say 8081, 8082, and 8083)
for each node.
a.
With Linux, modify
$CASSANDRA_HOME/conf/cas-
sandra.env.sh
as: