Create multi node Elassandra Cluster

Elassandra integrates Elasticsearch within Cassandra as a secondary index.

Elassandra = Cassandra + Elasticsearch

Elassandra need more memory than Cassandra because Elassandra is using Elasticsearch.

In here, you need several machines to setup multi node Elassandra cluster.

In my sample, I have used three machines to setup Elassandra cluster.

  • node 1 - 10.10.10.1
  • node 2 - 10.10.10.2
  • node 3 - 10.10.10.3
  1. First we must need to install Java Runtime 1.8.

2. You may need to install apt-transport-https. apt-transport-https allows the use of repositories accessed via the HTTP secure protocol.

3. Add Elassandra repository.

4. Add gpg key as well.

5. Install Elassandra.

6. Finally you must start cassandra using systemd.

You must install above steps in the every machines.

By default, listen_address and rpc_address is localhost.

listen_address - The IP address that Cassandra binds to connect this node to other nodes.(gossip)

rpc_address - The listen address for client connection.

seeds - Used to bootstrap the gossip process for new nodes joining a cluster. It is identified topology of the ring from the seeds list.

After installing Elassandra, you must change listen_address and rpc_address as IP address or host name of machine.

Example -

node 1 (10.10.10.1)

  • rpc_address = 10.10.10.1
  • listen_address = 10.10.10.1

node 2 (10.10.10.2)

  • rpc_address = 10.10.10.2
  • listen_address = 10.10.10.2

node 3 (10.10.10.3)

  • rpc_address = 10.10.10.3
  • listen_address = 10.10.10.3

Making every node a seed node is not recommended because of increased maintenance and reduced gossip performance. Gossip optimization is not critical, but it is recommended to use a small seed list.

How to setting seed nodes

  1. For node1 and node2, configure node1 as a seed node.

node 1

seeds - 10.10.10.1

node 2

seeds - 10.10.10.1

2. Start Elassandra of node1 and node2.

3. Change node1 and node2 seeds list as below,

node 1

seeds - 10.10.10.1,10.10.10.2

node 2

seeds - 10.10.10.1,10.10.10.2

4. Change the node3 cassandra.yaml and start the Elassandra.

node 3

seeds - 10.10.10.1,10.10.10.2

After starting all the nodes successfully, we can check cluster status.

If you need to change cluster name, you should configure it in cassandra.yaml.

cluster_name : Test Cluster

Reference

  1. https://docs.datastax.com/en/dse/6.0/dse-admin/datastax_enterprise/production/seedNodesForSingleDC.html#Preventingproblemsingossipcommunications
  2. https://elassandra.readthedocs.io/en/latest/installation.html

Love podcasts or audiobooks? Learn on the go with our new app.