Cassandra Nodes in the Junos Space Fabric Overview
The Apache Cassandra service is implemented in Junos Space Network Management Platform Release 15.2R1 to provide a distributed file system to store device image files. Junos Space nodes that have the Cassandra service enabled and running are called Cassandra nodes and when two or more Cassandra nodes exist in a Junos Space fabric, they form the Cassandra cluster. A Cassandra cluster in Junos Space can have nodes running only the Cassandra service (dedicated Cassandra nodes) or JBoss nodes running the Cassandra service, or a combination of both. With the Cassandra service implemented, the device image files are moved from the MySQL database to the Cassandra cluster, thereby improving the performance of the MySQL database.
In the Junos Space fabric, Cassandra clusters can have the following types of nodes:
JBoss nodes with the Cassandra service enabled
A Cassandra cluster can be formed in a Junos Space fabric by enabling the Cassandra service on JBoss nodes existing in the fabric. When the Cassandra service is enabled on a JBoss node, the node acts as both a JBoss node and Cassandra node.
Figure 1 shows a Cassandra cluster with the Cassandra service enabled on the existing JBoss nodes.
Dedicated Cassandra nodes
A dedicated Cassandra node provides only the Cassandra service in a fabric. If a dedicated Cassandra node already exists in the fabric, any new dedicated Cassandra node added to the fabric, together with the existing Cassandra node, forms a Cassandra cluster.
Within a fabric, a Cassandra cluster can have any number of Cassandra nodes (that is, a fabric can contain a Cassandra cluster of up to eight Cassandra nodes).
Figure 2 shows a Cassandra cluster with dedicated Cassandra nodes.
Dedicated Cassandra nodes and JBoss nodes with the Cassandra service enabled
A Cassandra cluster can comprise both dedicated Cassandra nodes and JBoss nodes on which the Cassandra service is enabled.
Figure 3 shows a Cassandra cluster with a JBoss and Cassandra node and a dedicated Cassandra node.
For a JBoss node to provide the distributed file functionality, you must first enable and then start the Cassandra service. You can enable, disable, start, or stop the Cassandra service on a JBoss node from the Junos Space Platform GUI.
You cannot start the Cassandra service on dedicated database nodes or Fault Monitoring and Performance Monitoring (FMPM) nodes.
You can also use the command-line interface of a JBoss node to monitor the Cassandra cluster in a fabric as follows:
To monitor the Cassandra cluster, use the nodetool status command.
The nodetool utility lists all the nodes in the Cassandra cluster and their status as shown in the following sample:
[user@host ~]# nodetool status platform Datacenter: DC1 =============== Status=Up/Down |/ State=Normal/Leaving/Joining/Moving -- Address Load Tokens Owns (effective) Host ID Rack UN 192.0.2.120 75.39 KB 256 100.0% 844cf4c4-e6ad-498a-a85f-c841d1f72419 RAC1 UN 192.0.2.121 84.94 KB 256 100.0% d670b1b8-d2a4-41b0-badb-0fc61dc88a5c RAC1
The Cassandra service provides the cqlsh command-line tool for interacting with the Cassandra database.
You can connect to the Cassandra database from any JBoss node by using the cqlsh <ip address> -u <username> -p <password> command, where <ip address> is the IP address of the Cassandra node, <username> is the username and <password> is the password used to access the Cassandra node.
[user@host]# cqlsh 192.0.2.120 -u test-user -p test-pwd Connected to Test Cluster at 192.0.2.120:9042 [cqlsh 5.0.1 | Cassandra 2.1.2 | CQL spec 3.2.0 | Native protocol V3] Use HELP for help cqlsh>