System Design Space
Knowledge graphSettings

Updated: May 4, 2026 at 8:57 PM

Cassandra: architecture and trade-offs

medium

History of Apache Cassandra, leaderless architecture, token-ring replication, tunable consistency, and LSM-style storage.

Cassandra is worth understanding not as generic NoSQL, but as a very specific architectural bet on availability, linear write growth, and designing from access patterns.

In a real system, this chapter helps you shape tables around partition keys, clustering columns, and partition boundaries, and choose consistency levels based on business-critical behavior rather than defaults.

In interviews and architecture discussions, it gives you a stronger language for explaining why Cassandra fits write-heavy, geographically distributed systems while demanding discipline on the read side.

Practical value of this chapter

Query-driven model

Design tables from access patterns: partition key, clustering columns, and partition-size boundaries.

Tunable consistency

Match consistency levels to operation criticality, latency budget, and product requirements.

Operational cycle

Treat compaction, repair, tombstone control, and capacity management as continuous architecture work.

Interview narrative

Position Cassandra as a fit for write-heavy geo-distributed systems with explicit read-side trade-offs.

Source

Apache Cassandra

History, architecture, and core engineering trade-offs of Apache Cassandra.

Перейти на сайт

Apache Cassandra is a distributed wide-column DBMS that combines ideas from Dynamo and Bigtable: peer nodes, a token ring, replication, and storage optimized for fast writes. It is not a universal database choice; it is a deliberate trade-off toward availability, horizontal growth, and reads that have been modeled in advance.

What makes Cassandra different

Wide-column store

Data is organized into keyspaces and tables designed around known query patterns.

Masterless architecture

All nodes are equal, eliminating a single point of failure and increasing availability.

AP + tunable consistency

The system prioritizes availability, while consistency can be selected per operation.

Limitations and compromises

  • Complex joins and exploratory ad-hoc queries usually need another tool.
  • Tables must be designed from future reads, not from a universal normalized model.
  • Cassandra works best at large scale with write-heavy workloads.

Ring, tokens, and replication

Ring Topology

ABCDEFToken Ring0 - 100

Consistent hashing

Choose a key to see how it is distributed across the ring (RF=3):

Replication Factor = 3

Each key is stored on 3 nodes: primary node and the next 2 clockwise nodes.

Write Path

  1. Client -> any node (coordinator)
  2. Coordinator computes a token for the key
  3. Token selects the primary range owner and RF-1 replicas
  4. Write is sent to the required replicas in parallel
Primary Node
Replica Nodes
Gossip Protocol

History: key milestones

2008

Facebook opens the code

Cassandra originated inside Facebook and became an open project in 2008.

2009

Apache Incubator

The project moved into the Apache Incubator and started growing within the Apache ecosystem.

2010

Top-level project

Apache Cassandra became a top-level Apache project and a standalone option for large deployments.

2011

1.0: first stable major release

The 1.0 release established Cassandra as a production-grade distributed DBMS.

2013

2.0: LWT and CQL mature

LWT built on CAS/Paxos and major improvements to CQL made the query model more practical.

2015

3.0: major storage update

The storage internals were significantly reworked, making read and write behavior more predictable.

2021

4.0: Focus on stability

A release with a focus on reliability, predictability and operational maturity.

2024

5.0: SAI and vector workloads

The new major release added Storage-Attached Indexes and capabilities for modern search and AI workloads.

2025

IBM and DataStax

IBM announced the acquisition of DataStax, strengthening the enterprise ecosystem around Cassandra.

Cassandra architecture by layers

The layers show the path from clients and coordinators to replication, the data model, and LSM-like storage with commit log, memtable, and SSTable.

Clients and CQL
CQLDriversProtocol
Layer transition
Routing and partitioning
Partitioned row storeDynamic columnsKeyspace / table
Layer transition
Replication and consistency
AP systemTunable consistencyMasterlessMulti-DC
Layer transition
Storage (LSM)
Commit logMemtableSSTableCompactionTombstones
Layer transition
OS + hardware
DiskCPU/RAMNetwork

Cluster architecture

All nodes are equalNo single point of failureLinear scaling

Data model

Keyspace -> Table -> RowFlexible columnsDenormalization

DDL and DML: how a request flows

DDL changes keyspaces and tables, while DML works with data. The diagram below shows the main steps for both request types.

How a request flows through Cassandra

Comparing the execution chain for DDL (schema) and DML (data)

Interactive replayStep 1/5

Active step

1. Node accepts request

Any cluster node can accept a DML request.

Data operations

  • DML works with data and indexes without changing schema.
  • Write path is optimized for high write throughput.
  • Consistency level defines write acknowledgement behavior.
Write-optimized pathLSM storageTunable consistency

Why choose Cassandra

  • Linear scaling when adding nodes.
  • High availability without a single point of failure.
  • Good write performance thanks to LSM-like storage.
  • Flexible consistency settings for different operation criticality.

Related chapters

  • Database Selection Framework - How to decide when Cassandra is the right fit for write-heavy distributed workloads versus when another store is preferable.
  • Replication and sharding - Operational patterns for replica placement, load balancing, and failure management in distributed data layers.
  • CAP theorem - Foundational context for availability/consistency trade-offs behind Cassandra's architectural choices.
  • PACELC theorem - CAP extension for evaluating latency and consistency during normal operation and choosing consistency levels deliberately.
  • Jepsen and consistency models - How to validate real distributed-database guarantees under partitions and failure scenarios.
  • Key-Value Database - Case-study view of a distributed key-value layer with partitioning and quorum decisions close to Cassandra-class requirements.

Enable tracking in Settings