Sponsored Content by DataStax

The future of Apache Cassandra is cloud native

By: Sam Ramji (@sramji)

Cloud native Apache Cassandra

Along with tens of thousands of developers and operators, and companies ranging from startups to titans like Apple and Netflix, we want to see Apache Cassandra™ become cloud-native.

We have done the work required to have an opinionAstra is built on Kubernetes, Prometheus, Envoy, and participates in the GKE and EKS native control and management planes.  We’ve reviewed work done by others, particularly those who have shared what they have learned in the form of open source Kubernetes operators for Cassandra (C*).

The opinion expressed in Astra is based on the technical work, changes, and trade-offs we’ve needed to make in order to operate C* at scale on Kubernetes in the cloud.  This opinion will continue to evolve as we continue to deliver and improve Astra.

We are sharing that opinion in contributions to the C* open source ecosystem – as OSS projects including a Kubernetes operator, a management sidecar, a metrics collector, a configuration builder, and a NoSQL testing system.

The corollary of sharing an opinion is listening to others.  Through the Cassandra Enhancement Proposal process, we see a vibrant set of hard-won experiences that have led to many Kubernetes operators for Cassandra.  Shared listening will lead us all to think and work together, improving our opinions with collective experience, and releasing better code for users.

What we are learning

We’ve learned about the structure and architecture of Apache Cassandra as it relates to cloud deployment.  This is helping us contribute to the community’s thinking on the architectural choices we will need to make together after the release of C* 4.0.  

We’ve put some of that into practice in our fork of Cassandra, and we expect to share this in the future.  We’ve put as much as possible into code that complements Cassandra to solve for Kubernetes-specific and cloud-native needs.

There are four areas of work needed to run a cloud-native service with Apache Cassandra 3.11: gateway, operations, management, and deployment.


Fig 1. High-level architecture of Astra on GKE/GCP

Gateway

Astra clusters receive traffic through the gateway. Astra uses Envoy to route Cassandra binary port requests and simplify driver configuration.  In cloud native configurations, having a single ingress IP is critical for managing connectivity with an elastic backend.  This also reduces the number of open ports exposed. This enables Astra to support CQL in the cloud while being elastic and secure.

Astra also uses the gateway to expose REST and GraphQL APIs for easing developer burden when interacting with data assets. We believe that these better serve a new generation of developers with experience in full-stack application development.

Operations

Cluster operations need to be automated.  Astra does this with a pair of components: Cass Operator and Management API for Apache Cassandra (MAAC).  Cass Operator is a Kubernetes Operator for Apache Cassandra and the MAAC is a Kubernetes sidecar.

Cass Operator provides a StatefulSet of C* nodes and automates the manual tasks normally performed by C* administrators.  This includes the start sequence for bringing up a cluster, draining nodes when they are deleted, and putting the right nodes in the right pods, such as preventing multiple nodes from deploying to the same host.

Participating gracefully in a Kubernetes environment requires providing insight into the cluster state.  In practice, this means that some operations that were previously database internals, such as automated retries, or establishing Gossip links to track internal cluster state, are raised up to the application layer.  

Kubernetes can then make decisions based on the health of the whole cluster, rather than each C* node making independent decisions based on its own view.  For example, during a rolling restart, instead of internal checks to see that a node is up, those signals are raised to Cass Operator, which makes sure that every C* node in the cluster can achieve quorum.

MAAC provides a JSON interface to invoke nodetool commands and inject Vault secrets.  This makes C* feel more like Kubernetes while retaining operational consistency with standard C* tooling.  This component starts, stops, configures, and checks liveness and consistency levels.  MAAC runs as a sidecar and communicates with C* via CQL via a local Unix socket (optionally over mTLS).  Each sidecar process is responsible for the local C* instance only.  This simplifies the topology and reinforces the role of Cass Operator as the orchestrator for the cluster.

Management

Metrics are essential for running C* at scale. Astra uses a Metrics Collector for Apache Cassandra (MCAC) to provide management functions that integrate with Kubernetes and cloud environments.

MCAC simplifies metrics collection for Cassandra users. The traditional mechanism for metrics in C* is JMX, which does not match the performance and scale needs for a deployment on Kubernetes.  MCAC is built on collectd and is bundled into Cass Operator. It works for all open source Apache Cassandra versions from 2.2 to 4.0 beta.  Using collectd means that hundreds of thousands of series per node can be exported with minimal impact on C* performance.  It aligns with Prometheus, the standard in Kubernetes environments for monitoring, and MCAC metrics can be analyzed along with OS-level metrics such as context switches, disk performance, and network performance.  Finally, MCAC creates a historical log of metrics and lifecycle events such as flushes, compactions, exceptions, and garbage collection.

MCAC is a critical part of Astra’s ability to give users visibility into the real-time running characteristics of their instance. Astra fully manages the operations of the underlying Cassandra nodes, but users need to understand the impacts of their data model and queries on the operational characteristics of the cluster.

Deployment

Deployment is continuous in a Kubernetes environment. By relinquishing control of configuration changes to the operator, Astra is able to provide a more dynamic and trustworthy data layer.  Astra uses cass-config-builder to drive configuration and NoSQLBench for continuous testing of the environment.. 

Cass-config-builder parametrically generates cassandra.yaml files based on environment requirements.  When a C* pod is started up, it ingests this configuration.  IP addresses, network information, performance tuning, security, disk optimization, seed providers are all key components for running C* correctly.  As Kubernetes controls the overall environment while scaling up and down, reacting to hardware failure, or changing fleet-wide properties, C* needs to adopt new configurations.

NoSQLBench gives users the ability  to create arbitrarily sized synthetic datasets and use those datasets to execute large scale load tests based on real-world application workloads to ensure that the cluster is trustworthy.  It works with any NoSQL database.  As part of a continuous deployment environment, test automation for the database can drive billions of write and read operations, thrashing storage volumes and demonstrating the cloud environment’s performance characteristics empirically.

Closing thoughts

Our aim is to use our ten years of experience building and operating enterprise Cassandra deployments to build a world-class cloud-native service for Apache Cassandra. 

Everything we see in feedback from Cassandra users tells us that Kubernetes needs Cassandra and Cassandra needs Kubernetes.  We’re building our “Cassandra-as-a-Service” on Kubernetes so that we are in the thick of the fight to make C* the best open source, scale-out, cloud-native database in the world.

Cassandra is becoming cloud-native.  We’re thrilled to be on that journey with all of you.

For more information on Asta, visit: https://astra.datastax.com/register

This article was originally posted on the DataStax blog.

More TechCrunch

The global spend management sector is experiencing a tailwind of sorts. North America is arguably the biggest market in this space, but spend management companies have seen demand rise across…

Spend management startup SiFi raises $10M to grow further in Saudi Arabia

Neural Concept lets designers model how components will perform before they can be manufactured.

Swiss startup Neural Concept raises $27M to cut EV design time to 18 months

The StrictlyVC roadtrip continues! Coming off of sold-out events in London, Los Angeles, and San Francisco, we’re heading to Washington, D.C. for a cozy-vc-packed, evening at the Woolly Mammoth Theatre…

Don’t miss StrictlyVC in DC next week

X will now allow users to post consensually produced NSFW content as long as it is prominently labeled as such.

X tweaks rules to formally allow adult content

Ashby consolidates existing talent acquisition tools and leans heavily on AI to automate the more repetitive steps in the recruitment pipeline.

Ashby injects recruiting with a dose of AI

Spotify has announced it’s hiking subscriptions for customers in the U.S., the second such price increase in the space of a year. The music-streaming giant reports that premium pricing will…

Spotify to increase premium pricing in the US to $11.99 per month

Monzo has announced its 2024 financial results, revealing its first full-year pre-tax profit. The company also confirmed that it’s in the early stages of expanding into the broader European market…

UK neobank Monzo reports first full (pre-tax) profit, prepares for EU expansion with Dublin hub

Last week, TechCrunch paid a visit to Apple’s Austin, Texas manufacturing facilities. Since 2013, the company has built its Mac Pro desktop about 20 minutes north of downtown. The 400,000…

Inside Apple’s efforts to build a better recycling robot

Early attempts at making dedicated hardware to house artificial intelligence smarts have been criticized as, well, a bit rubbish. But here’s an AI gadget-in-the-making that’s all about rubbish, literally: Finnish…

Binit is bringing AI to trash

Temasek has previously invested in Lenskart, and this new funding follows a $500 million investment by the Abu Dhabi Investment Authority last year.

Temasek, Fidelity buy $200M stake in Lenskart at $5B valuation

Less than one year after its iOS launch, French startup ten ten has gone viral with a walkie talkie app that allows teens to send voice messages to their close…

French startup ten ten reinvents the walkie-talkie

While all of Wesley Chan’s success has been well-documented over the years, his personal journey…not so much. Chan spoke to TechCrunch about the ways his life impacts how he invests…

Unicorn-rich VC Wesley Chan owes his success to a Craigslist job washing lab beakers

Presumptive Republican presidential nominee Donald Trump now has an account on the short-form video app that he once tried to ban. Trump’s TikTok account, which launched on Saturday night, features…

Trump takes off on TikTok

With fewer than 400,000 inhabitants, Iceland receives more than its fair share of tourists — and of venture capital.

Iceland’s startup scene is all about making the most of the country’s resources

Kobo put out a handful of new e-readers a few weeks back: color versions of the excellent Libra 2 and Clara, as well as an updated monochrome version of the…

Kobo’s new e-readers are a sidegrade most can skip (with one exception)

In an interview at his home near Reykjavík, the entrepreneur-turned-VC shared thoughts on his ventures and the journey that led him from Unity to climate tech, a homecoming of sorts.

Unity co-founder David Helgason’s next act: Gaming the climate crisis

Welcome back to TechCrunch’s Week in Review — TechCrunch’s newsletter recapping the week’s biggest news. Want it in your inbox every Saturday? Sign up here. Over the past eight years,…

Fisker collapsed under the weight of its founder’s promises

What is AI? We’ve put together this non-technical guide to give anyone a fighting chance to understand how and why today’s AI works.

WTF is AI?

President Joe Biden has vetoed H.J.Res. 109, a congressional resolution that would have overturned the Securities and Exchange Commission’s current approach to banks and crypto. Specifically, the resolution targeted the…

President Biden vetoes crypto custody bill

How large a role humanoids will play in that ecosystem is, perhaps, the biggest question on everyone’s mind at the moment.

Industries may be ready for humanoid robots, but are the robots ready for them?

VCs are clamoring to invest in hot AI companies, and willing to pay exorbitant share prices for coveted spots on their cap tables. Even so, most aren’t able to get…

VCs are selling shares of hot AI companies like Anthropic and xAI to small investors in a wild SPV market

The fashion industry has a huge problem: Despite many returned items being unworn or undamaged, a lot, if not the majority, end up in the trash. An estimated 9.5 billion…

Deal Dive: How (Re)vive grew 10x last year by helping retailers recycle and sell returned items

Tumblr officially shut down “Tips,” an opt-in feature where creators could receive one-time payments from their followers.  As of today, the tipping icon has automatically disappeared from all posts and…

You can no longer use Tumblr’s tipping feature 

Generative AI improvements are increasingly being made through data curation and collection — not architectural — improvements. Big Tech has an advantage.

AI training data has a price tag that only Big Tech can afford

Keeping up with an industry as fast-moving as AI is a tall order. So until an AI can do it for you, here’s a handy roundup of recent stories in the world…

This Week in AI: Can we (and could we ever) trust OpenAI?

Jasper Health, a cancer care platform startup, laid off a substantial part of its workforce, TechCrunch has learned.

General Catalyst-backed Jasper Health lays off staff

Live Nation says its Ticketmaster subsidiary was hacked. A hacker claims to be selling 560 million customer records.

Live Nation confirms Ticketmaster was hacked, says personal information stolen in data breach

An autonomous pod. A solid-state battery-powered sports car. An electric pickup truck. A convertible grand tourer EV with up to 600 miles of range. A “fully connected mobility device” for…

Inside EV startup Fisker’s collapse: how the company crumbled under its founders’ whims

Late Friday afternoon, a time window companies usually reserve for unflattering disclosures, AI startup Hugging Face said that its security team earlier this week detected “unauthorized access” to Spaces, Hugging…

Hugging Face says it detected ‘unauthorized access’ to its AI model hosting platform

Using stalkerware is creepy, unethical, potentially illegal, and puts your data and that of your loved ones in danger.

Hacked, leaked, exposed: Why you should never use stalkerware apps