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 design brief was simple: each grind and dry cycle had to be completed before breakfast. Here’s how Mill made it happen.

Mill’s redesigned food waste bin really is faster and quieter than before

Google is embarrassed about its AI Overviews, too. After a deluge of dunks and memes over the past week, which cracked on the poor quality and outright misinformation that arose…

Google admits its AI Overviews need work, but we’re all helping it beta test

Welcome to Startups Weekly — Haje‘s weekly recap of everything you can’t miss from the world of startups. Sign up here to get it in your inbox every Friday. In…

Startups Weekly: Musk raises $6B for AI and the fintech dominoes are falling

The product, which ZeroMark calls a “fire control system,” has two components: a small computer that has sensors, like lidar and electro-optical, and a motorized buttstock.

a16z-backed ZeroMark wants to give soldiers guns that don’t miss against drones

The RAW Dating App aims to shake up the dating scheme by shedding the fake, TikTok-ified, heavily filtered photos and replacing them with a more genuine, unvarnished experience. The app…

Pitch Deck Teardown: RAW Dating App’s $3M angel deck

Yes, we’re calling it “ThreadsDeck” now. At least that’s the tag many are using to describe the new user interface for Instagram’s X competitor, Threads, which resembles the column-based format…

‘ThreadsDeck’ arrived just in time for the Trump verdict

Japanese crypto exchange DMM Bitcoin confirmed on Friday that it had been the victim of a hack resulting in the theft of 4,502.9 bitcoin, or about $305 million.  According to…

Hackers steal $305M from DMM Bitcoin crypto exchange

This is not a drill! Today marks the final day to secure your early-bird tickets for TechCrunch Disrupt 2024 at a significantly reduced rate. At midnight tonight, May 31, ticket…

Disrupt 2024 early-bird prices end at midnight

Instagram is testing a way for creators to experiment with reels without committing to having them displayed on their profiles, giving the social network a possible edge over TikTok and…

Instagram tests ‘trial reels’ that don’t display to a creator’s followers

U.S. federal regulators have requested more information from Zoox, Amazon’s self-driving unit, as part of an investigation into rear-end crash risks posed by unexpected braking. The National Highway Traffic Safety…

Feds tell Zoox to send more info about autonomous vehicles suddenly braking

You thought the hottest rap battle of the summer was between Kendrick Lamar and Drake. You were wrong. It’s between Canva and an enterprise CIO. At its Canva Create event…

Canva’s rap battle is part of a long legacy of Silicon Valley cringe

Voice cloning startup ElevenLabs introduced a new tool for users to generate sound effects through prompts today after announcing the project back in February.

ElevenLabs debuts AI-powered tool to generate sound effects

We caught up with Antler founder and CEO Magnus Grimeland about the startup scene in Asia, the current tech startup trends in the region and investment approaches during the rise…

VC firm Antler’s CEO says Asia presents ‘biggest opportunity’ in the world for growth

Temu is to face Europe’s strictest rules after being designated as a “very large online platform” under the Digital Services Act (DSA).

Chinese e-commerce marketplace Temu faces stricter EU rules as a ‘very large online platform’

Meta has been banned from launching features on Facebook and Instagram that would have collected data on voters in Spain using the social networks ahead of next month’s European Elections.…

Spain bans Meta from launching election features on Facebook, Instagram over privacy fears

Stripe, the world’s most valuable fintech startup, said on Friday that it will temporarily move to an invite-only model for new account sign-ups in India, calling the move “a tough…

Stripe curbs its India ambitions over regulatory situation

The 2024 election is likely to be the first in which faked audio and video of candidates is a serious factor. As campaigns warm up, voters should be aware: voice…

Voice cloning of political figures is still easy as pie

When Alex Ewing was a kid growing up in Purcell, Oklahoma, he knew how close he was to home based on which billboards he could see out the car window.…

OneScreen.ai brings startup ads to billboards and NYC’s subway

SpaceX’s massive Starship rocket could take to the skies for the fourth time on June 5, with the primary objective of evaluating the second stage’s reusable heat shield as the…

SpaceX sent Starship to orbit — the next launch will try to bring it back

Eric Lefkofsky knows the public listing rodeo well and is about to enter it for a fourth time. The serial entrepreneur, whose net worth is estimated at nearly $4 billion,…

Billionaire Groupon founder Eric Lefkofsky is back with another IPO: AI health tech Tempus

TechCrunch Disrupt showcases cutting-edge technology and innovation, and this year’s edition will not disappoint. Among thousands of insightful breakout session submissions for this year’s Audience Choice program, five breakout sessions…

You’ve spoken! Meet the Disrupt 2024 breakout session audience choice winners

Check Point is the latest security vendor to fix a vulnerability in its technology, which it sells to companies to protect their networks.

Zero-day flaw in Check Point VPNs is ‘extremely easy’ to exploit

Though Spotify never shared official numbers, it’s likely that Car Thing underperformed or was just not worth continued investment in today’s tighter economic market.

Spotify offers Car Thing refunds as it faces lawsuit over bricking the streaming device

The studies, by researchers at MIT, Ben-Gurion University, Cambridge and Northeastern, were independently conducted but complement each other well.

Misinformation works, and a handful of social ‘supersharers’ sent 80% of it in 2020

Welcome back to TechCrunch Mobility — your central hub for news and insights on the future of transportation. Sign up here for free — just click TechCrunch Mobility! Okay, okay…

Tesla shareholder sweepstakes and EV layoffs hit Lucid and Fisker

In a series of posts on X on Thursday, Paul Graham, the co-founder of startup accelerator Y Combinator, brushed off claims that OpenAI CEO Sam Altman was pressured to resign…

Paul Graham claims Sam Altman wasn’t fired from Y Combinator

In its three-year history, EthonAI has amassed some fairly high-profile customers including Siemens and chocolate-maker Lindt.

AI manufacturing startup funding is on a tear as Switzerland’s EthonAI raises $16.5M

Don’t miss out: TechCrunch Disrupt early-bird pricing ends in 48 hours! The countdown is on! With only 48 hours left, the early-bird pricing for TechCrunch Disrupt 2024 will end on…

Ticktock! 48 hours left to nab your early-bird tickets for Disrupt 2024

Biotech startup Valar Labs has built a tool that accurately predicts certain treatment outcomes, potentially saving precious time for patients.

Valar Labs debuts AI-powered cancer care prediction tool and secures $22M

Archer Aviation is partnering with ride-hailing and parking company Kakao Mobility to bring electric air taxi flights to South Korea starting in 2026, if the company can get its aircraft…

Archer, Kakao Mobility partner to bring electric air taxis to South Korea in 2026