How to Remove Datacenter in Cassandra Cluster

We can use the following steps to remove a datacenter in the Cassandra cluster. Check the network connection for TCP port 9042 with this command. netstat -anpl|grep 9042. This is to make sure all the clients are not connecting to this DC. Run a full repair for the data Check the replication factor for all […]

How Nodetool Repair Works in Cassandra?

In Cassandra, data in a replica can become inconsistent with other replicas due to the distributed nature of the database. Node repair corrects the inconsistencies so that eventually all nodes have the same and most up-to-date data. It is an important part of regular maintenance for every Cassandra cluster. Cassandra Anti-Entropy Repairs Anti-entropy repair in […]

How Nodetool Removenode And Decommission Work

We can take a node out of the cluster with nodetool decommission to a live node, or nodetool removenode (to any other machine) to remove a dead one. This will assign the ranges the old node was responsible for to other nodes, and replicate the appropriate data there. If decommission is used, the data will […]

Exploring Time_Wait status in Linux Netstat command

TIME WAIT state is a normal part of a TCP socket’s life cycle. It cannot and should not be avoided. TIME WAIT sockets may become an issue when there are tens of thousands active at any given time. Otherwise, smaller numbers of TIME WAIT sockets are normal. TIME_WAIT: The host waits for a reasonable amount of time […]

Monitor Apache Cassandra cluster with free open source software

Many people choose free open source software to monitor Cassandra cluster to save cost. In our env, we use telegraf/Influxdb/Grafana to monitor Cassandra performance. This monitoring package is open source. We can download and use them for free. Use TIG to monitor Cassandra performance Configuration file for Cassandra Monitoring Cassandra performance metrics Use TIG to […]

4 Ways to Troubleshoot Cassandra TimeoutException Issues

Error message is the first step to troubleshoot Apache Cassandra issues. That can help us identify if the issue happens on client-side or server-side. Here are the 4 most common Cassandra issues below. Check Cassandra SyntaxError (client) This and other QueryValidationException indicate that the client sent a malformed request. These are rarely server issues and […]

How to migrate Datastax Cassandra to Open Source Apache Cassandra?

We need to add open source Apache node to dse cluster first. After the data sync is done, we can remove dse nodes. Here are the steps about how to add Apache nodes to dse cluster. Version matches please make sure you Install same version OSS Cassandra with your DSE SELECT release_version FROM system.local; release_version […]

How to create user/permission with examples in Cassandra?

CREATE USER in Cassandra CREATE USER alice WITH PASSWORD ‘password_a’ SUPERUSER; CREATE USER bob WITH PASSWORD ‘password_b’ NOSUPERUSER; CREATE USER is equivalent to CREATE ROLE where the LOGIN option is true. So, the following pairs of statements are equivalent: CREATE USER alice WITH PASSWORD ‘password_a’ NOSUPERUSER; CREATE ROLE alice WITH PASSWORD = ‘password_a’ AND LOGIN […]

14 Apache Cassandra best Practices for developers & Application Teams

No Load balancers in front of cassandra Cassandra distributes the data across the nodes and most of the cassandra drivers have the algorithm built in to direct requests appropriately . Adding load balancer introduces an additional layer , potentially breaks intelligent algorithms used by driver and also introduces a single point of failure where there […]

27 Cassandra Best Practices for Administrators / DBA team

Decrease the default read ahead values in unix/linux systems Most of the modern unix/linux systems use read ahead so that subsequent reads will be cached in to memory . This provides a performance benefit for systems that read data sequentially (e.g. Kafka) .However, in cassandra most normal read operations are not sequential and hence read […]