Easy-Cass-Lab Now Available in Homebrew

I’m happy to share some exciting news for all Cassandra enthusiasts! My open source project, easy-cass-lab, is now installable via a homebrew tap. This powerful tool is designed to make testing any major version of Cassandra (or even builds that haven’t been released yet) a breeze, using AWS. A big thank-you to Jordan West who took the time to make this happen!

What is easy-cass-lab?

easy-cass-lab is a versatile testing tool for Apache Cassandra. Whether you’re dealing with the latest stable releases or experimenting with unreleased builds, easy-cass-lab provides a seamless way to test and validate your applications. With easy-cass-lab, you can ensure compatibility and performance across different Cassandra versions, making it an essential tool for developers and system administrators. easy-cass-lab is used extensively for my consulting engagements, my training program, and to evaluate performance patches destined for open source Cassandra. Here are a few examples:

  • CASSANDRA-19534 - Unbounded queues in native transport requests lead to node instability
  • CASSANDRA-19477 - Improve hint performance by avoiding disk access in HintsStore.getTotalFileSize
  • CASSANDRA-15452 - Improve disk access patterns during compaction and streaming

The first two fixes have been merged already. The third (as of this writing) is a work in progress that will deliver a massive performance improvement to Cassandra clusters running on EBS or other disks with IOPS quotas. Here’s a recording of the livestream where I did the evaluation with Jordan West:

More to come on these issues in follow-up posts.

How to Install

Getting started with easy-cass-lab is straightforward. Use the following shell commands to setup the tap:

brew tap rustyrazorblade/rustyrazorblade
brew install easy-cass-lab

You can now set up an environment. Run the following to create a new directory and initialize it with a three-node cluster and a single easy-cass-stress instance:

mkdir my-first-cluster
cd my-first-cluster
easy-cass-lab init -c 3 -s 1 my-first-cluster

You’ll be prompted to answer some questions. For now, easy-cass-lab only supports us-west-2 but support for more regions is right around the corner. I highly recommend signing up for a free AxonOps account to get access to their free monitoring up to six nodes. I wrote a review of their service in 2023 and have found it to be the best monitoring option for Cassandra.

Let’s continue! The init command wrote some configuration to the local directory. Now you’ll want to fire up the instances:

easy-cass-lab up

Since easy-cass-lab uses an AMI that has several versions built in, we can get started immediately by doing the following to choose Cassandra 4.1:

easy-cass-lab use 4.1

Now we can start the cluster with the following:

easy-cass-lab start

The cluster will start, adding one node at a time. Now you’ve got a three-node cluster running 4.1.

You’ll probably want to SSH into the cluster now and start messing around. The easiest way to do this is to run the following, which will set up some shell aliases for you:

source env.sh

Now SSH to the stress box using the alias defined in env.sh:

s0

This sets up several additional aliases, including c0, c1, etc, which allow you to SSH to the Cassandra nodes.

Let’s see what happens when we run our first load test for an hour, at 50k requests per second. From the stress box you just SSH’ed into using s0, run the following:

ubuntu@stress0:~$ easy-cass-stress run KeyValue -d 1h --rate 50k

You’ll see some output similar to iostat showing you the performance numbers from the load test. If you set up AxonOps, you’ll be able to view your cluster’s performance metrics. You can see an increase in CPU activity as the workload ramps up:

When you’re ready to tear down your cluster, you can do the following:

easy-cass-lab down

You’ll be prompted to confirm, type yes to have easy-cass-lab shut down your instances.

There’s a LOT more to easy-cass-lab that we haven’t gotten into yet. If you’re finding this useful and are curious to learn more, the help page has all the options:

easy-cass-lab -h

Frequent Updates

easy-cass-lab has a rapid development cycle. Expect frequent updates, delivering new versions of Cassandra, diagnostic tooling, and additional testing options. The long-term goal is to support my investigations, which requires flexibility and reliability. Any time I need to test something new, that functionality will land in easy-cass-lab. If you’re curious about the roadmap, take a look at the open GitHub issues.

Be on the lookout for my upcoming YouTube series showing off other things you can do with easy-cass-lab!

Conclusion

I hope you found this post useful! As you can see, easy-cass-lab is a powerful tool that allows you to skip the headache of figuring out how to set up a cluster and quickly jump into testing. Stay tuned for updates as the project matures.

If you found this post helpful, please consider sharing to your network. I'm also available to help you be successful with your distributed systems! Please reach out if you're interested in working with me, and I'll be happy to schedule a free one-hour consultation.