Automatic Visibility/Observability

 View Only

Monitoring Cassandra performance metrics using Instana

By Adharsh H posted Fri May 17, 2024 04:39 AM

  

Co-author: Neha Ghongade   

Apache Cassandra is scalable and has high-performance distributed database for processing large data across multiple commodity servers that provides high availability. Apache Cassandra was developed by Facebook and then open sourced as an Apache project. Apache Cassandra implements a Dynamo-based instance model with no failure, but adds a robust "column-family" data model. The deployment design is based on Amazon's Dynamo and Google Bigtable data models.

In addition to the default Cassandra database, DataStax Enterprise (DSE) is an enterprise-grade Apache Cassandra distribution that offers many features and enhancements. DataStax, the company that is responsible for DSE, provides services and business support to companies that use Cassandra in production environments.

Architecture

Cassandra sensor on host agent collects the performance metrics data from the running Cassandra environment. The performance metrics data is displayed on Instana server dashboard.

Supported Cassandra versions by the Instana

Instana currently supports all the versions of the following Cassandra and DSE:

  • Cassandra 2.0 and 2.2
  • Cassandra 3.0
  • Cassandra 4.0 and 4.1
  • DSE 6.0
  • DSE 6.7
  • DSE 6.8

Prerequisites

  1. To use Cassandra, ensure that the latest version of Java 8 or Java 11 is installed.
  2. To use DSE, ensure that Oracle Java SE 8 (JRE or JDK) (1.8.0_151 minimum) is installed.
  3. You need the latest version of Python 3.6+ or Python 2.7 to use cqlsh.
  4. Ensure that Instana agent is installed and reports to your Instana server. 

Installation

Installing Apache Cassandra

  1. To verify the java version that is installed, run the following command:
    java -version
  2. Download the binary tarball from Apache Cassandra Download.
  3. To unpack the tarball, run the following command:
    tar -xzvf apache-cassandra-<version>-bin.tar.gz
  4. In the <home>/apache-cassandra-<version>/bin/ path, to start Cassandra, run the following command:
    ./cassandra -R

  5. To verify the status of Cassandra, in the bin directory, run the following command:

    ./nodetool status

    You can view the following output:

Installing DataStax Enterprise(DSE)

  1. To verify that the required version of Java is installed, run the following command:
    java -version
  2. Download the tarball from Download DataStax Enterprise.
  3. To extract the tarball, run the following command:
    tar -xzvf dse-<version>-bin.tar.gz
  4. To start DataStax Enterprise from the installation directory, run the following command:
    ./bin/dse cassandra -R
  5. To verify that DataStax Enterprise is running in the installation directory, run the following command:
    ./bin/nodetool status

Installing Instana Agents

For more information about how to install and configure instana agent where Cassandra is installed, see Installing host agent.

Cassandra performance monitoring

Monitoring Cassandra needs to prevent performance challenges such as bottlenecks and sluggishness that might impact users. Therefore, to identify and resolve issues related to the distinctive node replication setup of Cassandra is necessary. To maintain operational efficiency and ensure uninterrupted service on a large scale, a reliable Cassandra monitoring solution is required to prevent slowdowns and cluster outages. Instana helps you to monitor individual Cassandra nodes to find and resolve the root cause of performance issues.

When Instana automatically deploys Cassandra sensor the Cassandra sensor initiates the mapping of Cassandra infrastructure. Thisinfrastructure includes identifying the individual write-back cache nodes in their respective datacenters and establishing the connections between datacenters and their clusters. Instana collects performance metrics at both the node and cluster levels to diagnose the interaction quality among the Cassandra nodes and clusters. Subsequently, the Instana agent transmits these metrics to the Dynamic Graph model, which stores and reviews all collected monitoring data. 

Following are the common metrics that are obtained at the node level:

  • Requests
  • Client Read/Write Latencies
  • Pending Requests

Following are a few examples of metrics that are collected at the cluster level:

  • Keyspace Details
  • Replication Factors
  • Disk Sizes

For more information, see Monitoring Cassandra. Based on the infrastructure, developers can configure the threshold limits for Instana to alert with context at the time of failure.

Cassandra health monitoring

Instana monitors Cassandra Key Performance Indicators (KPIs) to diagnose health status of Cassandra in the monitored environment. The Dynamic Graph in Instana's User Interface(UI) displays events and incidents along a timeline. Any change in the Cassandra environment, such as developer modifications, cluster reconfigurations, or key space deletions, are promptly detected, displayed in the UI, and logged in the event list.

If there is an issue with Cassandra health or performance, the Instana UI issues a technology issue alert and change the health color of the instance. If the service is impacted, a Service Incident is created. Performance issues are correlated with all developer changes to determine the root cause.

I hope this article is helpful. For more information about Instana and its monitoring capabilities, see IBM Instana is the only real-time full-stack observability solution: zero sample tracing.

0 comments
16 views

Permalink