System Design Space
Knowledge graphSettings

Updated: June 24, 2026 at 4:23 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.

Decision frame and editorial focus

Chapter focus

leaderless architecture, tunable consistency, and write-heavy workloads

Workload profile

Look at the critical user path: transactions, key-based reads, indexes, p95/p99 latency, and recovery behavior.

Good fit

The chapter should answer why this engine fits an operational/OLTP path, cache tier, or write-heavy model.

Boundary and risk

Avoid universal claims: every engine has a price in consistency, migrations, memory, indexing, or operational discipline.

Connect next

Compare against the database-selection framework, replication/sharding, and neighboring operational engines.

Source

Apache Cassandra

The project's history, how the ring works, and the trade-offs made for availability and growth.

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

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 laid out across keyspaces and tables. You model the schema from concrete queries: anything not planned in advance gets expensive to retrieve later.

Masterless architecture

Nodes are equal — there is no leader whose failure stops writes. The price: consistency is your call at the request level, not something the schema enforces.

AP + tunable consistency

Cassandra trades strict consistency for availability (the AP side). The consistency level is chosen per operation — a critical write goes through a quorum, a background read can settle for less.

Limitations and compromises

  • Complex joins and one-off exploratory queries hit a wall here — reach for another tool instead.
  • You build the schema from future reads; a normalized, one-size-fits-all model turns into slow queries in Cassandra.
  • At small scale or with read-heavy traffic the payoff disappears — Cassandra earns its keep on large data and 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

A request travels from the client to a coordinator, on to the replicas, and settles into LSM-like (log-structured merge) storage: commit log, memtable, SSTable. Each layer carries its own trade-off between write speed and the cost of later reads.

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 the structure — keyspaces and tables; DML works with the data itself. Their paths differ, and the diagram below breaks down the main steps for each request type.

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 growth: add nodes and capacity plus throughput grow in proportion.
  • No single point of failure, so losing a node does not stop writes.
  • Writes stay fast thanks to LSM-like (log-structured merge) storage.
  • The consistency level is tuned per operation criticality rather than fixed for the whole database.

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 - Where the choice between availability and consistency comes from — the CAP theorem explains why Cassandra lands on the AP side.
  • PACELC theorem - CAP extension for evaluating latency and consistency during normal operation and choosing consistency levels deliberately.
  • Jepsen and consistency models - Tunable consistency is a promise; here it gets tested under partitions and failure scenarios to reveal what Cassandra actually guarantees.
  • 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