Book Image

Apache Cassandra Essentials

By : Nitin Padalia
Book Image

Apache Cassandra Essentials

By: Nitin Padalia

Overview of this book

Apache Cassandra Essentials takes you step-by-step from from the basics of installation to advanced installation options and database design techniques. It gives you all the information you need to effectively design a well distributed and high performance database. You’ll get to know about the steps that are performed by a Cassandra node when you execute a read/write query, which is essential to properly maintain of a Cassandra cluster and to debug any issues. Next, you’ll discover how to integrate a Cassandra driver in your applications and perform read/write operations. Finally, you’ll learn about the various tools provided by Cassandra for serviceability aspects such as logging, metrics, backup, and recovery.
Table of Contents (14 chapters)
Apache Cassandra Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding nodes to our cluster


Now, let's extend our node to a five-node cluster from a three-node cluster. Let's take two new loopback IPs as 127.0.0.4 and 127.0.0.5.

Note

Here, we're using loopback IPs for the simplicity of our example; if you're running using the same on a single machine, ensure that it has enough RAM and CPU on the host machine.

The cassandra.yaml file with key configuration options for these two new nodes will look as follows:

A sample cassandra.yaml file for node 5 with some key configuration parameters is shown in the following image. Here, both the nodes are using node 2 with the IP address 127.0.0.2 as the seed node:

In the preceding figure, we've enabled auto_bootstrap for both the nodes so that data will be automatically migrated to these nodes for the token range they'll own. Also, as we can see that we're using the snitch type GossipingPropertyFileSnitch in the images, let's update the cassandra-rackdc.properties files for each node. Let's assume node 1, node 4, and...