Apache Cassandra
A masterless, wide-column database that spreads and replicates partitions around a ring of equal nodes, with consistency chosen per request.
- What it is
- Wide-column stores
- Type
- Open source
- Made by
- Apache Software Foundation
- 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_QUORUMkeeps 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_QUORUMand ignores compaction and other server settings
Alternatives
What all wide-column stores have in common →How it fits with other technologies
What Apache Cassandra uses
- Apache Cassandrais reimplemented, CQL-compatible, byScyllaDB
- Apache Cassandrais read and written, via a connector, byApache Spark
- Apache Cassandrareceives topics, via a sink connector, fromApache Kafka
- Apache Cassandrais written to, via a sink connector, byApache Flink
- Apache Cassandrais queried with SQL, via a connector, byTrino
- Apache Cassandraruns, via the K8ssandra operator, onKubernetes
- Apache Cassandracan store workflow state and history forTemporal
- Apache Cassandrajournals entity events, via a plugin, forApache Pekko
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 Cassandra | ScyllaDB | |
|---|---|---|
| Written in | Java, 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 node | One JVM process serving all of the node’s token ranges | One shard per CPU core: a thread pinned to that core with its own memory and data |
| Spreading data | Virtual nodes: each node owns 16 token ranges by default | Tablets by default: each table is split into tablets that split and move as data grows |
| APIs | CQL | CQL (Cassandra 3.11 level, with some 4.0 features) and the DynamoDB API, called Alternator |
| Recent features | Storage Attached Indexes, vector search, trie memtables, Unified Compaction Strategy (5.0) | Tablets; vector search, but only in ScyllaDB Cloud; no Storage Attached Indexes |
| Licence | Apache 2.0 | Source-available: free use capped at 10 TB and 50 vCPUs, no SaaS; the AGPL edition ended with 6.2 |
| Managed | Amazon 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.0Packages, 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 requestA 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 networkReal 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 2025DataStax’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
ONEandQUORUM, 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
- 2007
Amazon’s Dynamo paper, co-written by Avinash Lakshman, is published
- 2008
Facebook launches Inbox Search on Cassandra and open-sources it
- 2009
Cassandra enters the Apache Incubator in January
- 2010
Becomes a top-level Apache project; Facebook picks HBase for Messages
- 2011
Cassandra 1.0 is released in October
- 2021
Cassandra 4.0 ships in July, six years after 3.0
- 2024
Cassandra 5.0 adds Storage Attached Indexes and vector search
- 2025
IBM acquires DataStax, maker of Astra DB
- Lakshman and Malik: Cassandra, a decentralized structured storage system (LADIS 2009)
- Avinash Lakshman, Engineering at Meta: Cassandra, a structured storage system on a P2P network (Aug 2008)
- Werner Vogels: Amazon’s Dynamo (authors of the 2007 paper)
- Apache Incubator: Cassandra incubation status (entered January 2009, graduated February 2010)
- ASF board minutes, February 17, 2010: Establish the Apache Cassandra Project
- Engineering at Meta: The underlying technology of Messages (Nov 2010)
- apache/cassandra on GitHub: tag cassandra-1.0.0 (October 2011)
- Apache Cassandra blog: Apache Cassandra 4.0 is here (July 2021)
- Apache Cassandra blog: Announcing Apache Cassandra 5.0 (Sept 2024)
- IBM Q2 2025 earnings release (Form 8-K exhibit): “We closed the acquisition of DataStax this quarter”
Sources31 · facts checked 6 October 2026
- Cassandra docs: Architecture overview (Dynamo and Bigtable lineage)
- Cassandra docs: Dynamo (token ring, vnodes, replication, consistency levels, gossip, repair, last write wins)
- Cassandra docs: Storage engine (commit log, memtables, SSTables, compaction)
- Cassandra docs: cassandra.yaml (num_tokens default 16; materialized views experimental)
- Cassandra docs: Tombstones and gc_grace_seconds
- Cassandra docs: Data modeling introduction (query-driven modeling, no joins)
- Cassandra docs: Data manipulation (lightweight transactions use Paxos)
- Cassandra docs: SAI quickstart
- Apache Cassandra blog: Announcing Apache Cassandra 5.0 (SAI, vector search, trie memtables, UCS, JDK 17)
- Apache Cassandra downloads (5.0.9, August 2026)
- apache/cassandra on GitHub: NEWS.txt at cassandra-6.0-alpha2 (transactional cluster metadata, auto repair, JDK 21)
- Amazon Keyspaces docs: What is Amazon Keyspaces?
- Amazon Keyspaces docs: Functional differences from Apache Cassandra
- Amazon Keyspaces pricing (request units, replication, consistency levels)
- Microsoft Learn: Azure Managed Instance for Apache Cassandra
- IBM newsroom: IBM to acquire DataStax (Feb 2025)
- IBM: DataStax (Astra DB and HCD in watsonx)
- ScyllaDB docs: ScyllaDB and Apache Cassandra compatibility
- ScyllaDB docs: Data distribution with tablets
- ScyllaDB docs: Glossary (shard)
- ScyllaDB docs: Vector search (ScyllaDB Cloud only)
- Dor Laor, ScyllaDB blog: Why we’re moving to a source available license (6.2 is the last AGPL release)
- ScyllaDB Software License Agreement 1.1
- Seastar: shared-nothing C++ framework
- Apache Cassandra Spark connector
- DataStax Apache Kafka connector (sink to Cassandra)
- Flink docs: Cassandra connector
- Trino docs: Cassandra connector
- K8ssandra docs
- Temporal docs: Persistence (supported Cassandra versions)
- Apache Pekko Persistence Cassandra