Cloud Parts

Apache Cassandra

A masterless, wide-column database that spreads and replicates partitions around a ring of equal nodes, with consistency chosen per request.

Type
Open source
License
Apache 2.0
Facts checked
6 October 2026

What it is

A Cassandra cluster has no leader. Each node owns several ranges on a token ring (16 virtual nodes per node by default), and a row’s partition key is hashed to a token that decides which nodes hold its replicas; the replication factor is set per keyspace and per datacenter. Any node can coordinate a request. It sends a write to every replica and waits for as many answers as the consistency level asks for: ONE, QUORUM (a majority), LOCAL_QUORUM (a majority in this datacenter) or ALL. Nodes learn about each other by gossip. Conflicting writes resolve by timestamp, last write wins, and replicas catch up through hinted handoff, read repair and Merkle-tree anti-entropy repair.

On each node, a write is appended to the commit log and kept in a memtable, which is later flushed to immutable SSTables on disk; background compaction merges them. Deletes are tombstones that must outlive gc_grace_seconds (ten days by default), so repair has to run within that window. You define tables in CQL, a SQL-like language without joins, and design one table per query, choosing a partition key and clustering columns that keep each query’s rows together. The current release line is 5.0 (September 2024), which added Storage Attached Indexes, vector search, trie memtables and the Unified Compaction Strategy; 6.0 is in alpha. Cassandra is free under Apache 2.0; managed versions include Amazon Keyspaces, Azure Managed Instance for Apache Cassandra and Astra DB from DataStax, which IBM bought in 2025.

Why teams pick it

  • No master to fail over: every node can take reads and writes for any key
  • Replication across datacenters is built in, and LOCAL_QUORUM keeps each request inside one region
  • Append-only writes (commit log, memtable, SSTables) handle very high write rates
  • Grows by adding nodes, and virtual nodes spread the data that moves across many neighbours
  • Apache 2.0, with several managed services that speak the same CQL protocol

Watch out for

  • No joins and no cross-partition transactions: you design tables around known queries and often write the same data to several of them
  • Ongoing operational work: repair before tombstones expire, compaction tuning, JVM tuning and long, careful upgrades
  • Last-write-wins by timestamp depends on synchronised clocks, and lightweight transactions (IF NOT EXISTS) use Paxos and cost noticeably more
  • Materialized views are experimental and off by default; flexible indexing on non-key columns only arrived with SAI in 5.0
  • Managed versions behave differently: Amazon Keyspaces always writes at LOCAL_QUORUM and ignores compaction and other server settings

Alternatives

What all wide-column stores have in common →

How it fits with other technologies

A table shaped for one query, written and read at LOCAL_QUORUM in cqlsh · sql

-- three replicas in each of two datacenters
CREATE KEYSPACE iot WITH replication =
  {'class': 'NetworkTopologyStrategy', 'eu-west': 3, 'us-east': 3};

-- query: latest readings for one sensor on one day
CREATE TABLE iot.readings_by_sensor_day (
  sensor_id   text,
  day         date,
  ts          timestamp,
  temperature double,
  PRIMARY KEY ((sensor_id, day), ts)
) WITH CLUSTERING ORDER BY (ts DESC);

CONSISTENCY LOCAL_QUORUM;  -- cqlsh: 2 of the 3 local replicas must answer

INSERT INTO iot.readings_by_sensor_day (sensor_id, day, ts, temperature)
VALUES ('s-17', '2026-10-06', '2026-10-06 09:30:00+0000', 21.4)
USING TTL 2592000;  -- expires after 30 days

SELECT ts, temperature FROM iot.readings_by_sensor_day
WHERE sensor_id = 's-17' AND day = '2026-10-06' LIMIT 10;

-- Cassandra 5.0: a Storage Attached Index on a non-key column
CREATE INDEX readings_temp_sai ON iot.readings_by_sensor_day (temperature) USING 'sai';

Cassandra or ScyllaDB?#

ScyllaDB rewrote Cassandra’s design in C++ and speaks the same CQL protocol, so the two are often weighed against each other. Where they differ, according to each project’s own docs and licence:

Apache CassandraScyllaDB
Written inJava, on the JVM (5.0 adds JDK 17; 6.0 defaults to generational ZGC on JDK 21)C++ on the Seastar framework, no JVM
Inside a nodeOne JVM process serving all of the node’s token rangesOne shard per CPU core: a thread pinned to that core with its own memory and data
Spreading dataVirtual nodes: each node owns 16 token ranges by defaultTablets by default: each table is split into tablets that split and move as data grows
APIsCQLCQL (Cassandra 3.11 level, with some 4.0 features) and the DynamoDB API, called Alternator
Recent featuresStorage Attached Indexes, vector search, trie memtables, Unified Compaction Strategy (5.0)Tablets; vector search, but only in ScyllaDB Cloud; no Storage Attached Indexes
LicenceApache 2.0Source-available: free use capped at 10 TB and 50 vCPUs, no SaaS; the AGPL edition ended with 6.2
ManagedAmazon Keyspaces, Azure Managed Instance, Astra DB (IBM)ScyllaDB Cloud, billed by instance rather than per request
  • ScyllaDB works with Cassandra drivers and can import Cassandra’s SSTables, but check features such as user-defined functions, triggers and SAI before migrating: its compatibility page lists them as unsupported.

Where to run it#

Self-managed

Apache 2.0

Packages, tarballs or containers on your own machines. You own repair schedules, upgrades and capacity. On Kubernetes, the K8ssandra operator deploys and manages clusters.

Amazon Keyspaces

serverless, per request

A Cassandra-compatible service with no nodes to manage. Data is kept three times across Availability Zones; writes always use LOCAL_QUORUM, reads LOCAL_ONE or LOCAL_QUORUM. On-demand bills a read request unit per 4 KB read at LOCAL_QUORUM (half at LOCAL_ONE) and a write unit per 1 KB written; provisioned capacity is the alternative. Compaction, caching and similar settings are ignored.

Azure Managed Instance for Apache Cassandra

VMs in your network

Real open-source Cassandra, up to 5.0, deployed as virtual machine scale sets in your virtual network. Datacenters can join an existing ring on premises. Billed for the VMs and disks you choose, with no licence fee.

Astra DB

IBM since 2025

DataStax’s Cassandra-based cloud database with vector search. IBM announced it would buy DataStax in February 2025 and closed the deal in the second quarter of 2025; Astra DB is now sold as part of IBM watsonx.

See it in a real stack

No architecture uses Apache Cassandra yet. Drop it into the playground and wire it up yourself.Open playground →

Benchmarks

How to read a benchmark →
Where it came from2007–2025

Facebook’s Inbox Search had to store an index of the messages every user sent and received: billions of writes a day, served from data centers on both US coasts. Avinash Lakshman, one of the authors of Amazon’s 2007 Dynamo paper, and Prashant Malik built Cassandra for it. They combined Dynamo’s way of spreading and replicating data, with consistent hashing, gossip and no master, with the column families and log-structured storage of Google’s Bigtable. Inbox Search launched on it in June 2008 for about 100 million users.

Facebook open-sourced Cassandra in 2008. It entered the Apache Incubator in January 2009 and became a top-level project in February 2010. That November, Facebook chose HBase rather than Cassandra for its new Messages system, finding Cassandra’s eventual consistency hard to reconcile with it, but development carried on at Apache.

Version 4.0 arrived in July 2021, six years after 3.0, after the project built new tools to test correctness at scale. 5.0, in September 2024, added Storage Attached Indexes and vector search.

Why it’s built this way

No master: every node is equal
Running on hundreds of machines across data centers, components fail all the time. With no single point of failure, any node can take any request and a lost node needs no failover.
Consistency chosen per request
Cassandra adapted Dynamo’s rule that reads and writes must overlap (R + W > N) into named levels such as ONE and QUORUM, so each query can trade freshness for latency and availability.
Bigtable’s log-structured storage
Inbox Search needed very high write throughput. Appending to a commit log and an in-memory table, then flushing sorted files and compacting them later, means a write never waits for a read.

Timeline

  1. 2007

    Amazon’s Dynamo paper, co-written by Avinash Lakshman, is published

  2. 2008

    Facebook launches Inbox Search on Cassandra and open-sources it

  3. 2009

    Cassandra enters the Apache Incubator in January

  4. 2010

    Becomes a top-level Apache project; Facebook picks HBase for Messages

  5. 2011

    Cassandra 1.0 is released in October

  6. 2021

    Cassandra 4.0 ships in July, six years after 3.0

  7. 2024

    Cassandra 5.0 adds Storage Attached Indexes and vector search

  8. 2025

    IBM acquires DataStax, maker of Astra DB

Sources31 · facts checked 6 October 2026

Improve this page on GitHub