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
About the Author
About the Reviewers

Virtual nodes

In earlier versions of Cassandra, prior to version 1.2, each node used to own only one token, and hence it was responsible for handling only one contiguous token range in the cluster ring. This mechanism was good but was slower and relatively harder to configure in following scenarios:

  • Configuring a cluster.

    While configuring a cluster, we need to calculate and assign tokens to each node manually.

  • Adding or removing a node

    When a node is added or removed, we need to do a token calculation again to rebalance the cluster. If a node is added, we need to assign a new token range to this node and reduce the token range of the rest of the nodes. Similarly, if a node is removed, we need to calculate the token range again so that a larger token range is handled by each node.

  • Replacing a dead node.

    Prior to virtual nodes each node was responsible for handling a big contiguous token range. When such a node is dead and replaced by a new node, other node/s responsible for same token range will...