Apache Cassandra is the archetype of high-throughput, horizontally scalable, masterless distributed databases. Inspired by Amazon’s Dynamo paper and Google’s Bigtable storage model, Cassandra dispenses with leader-follower architectures in favor of a completely decentralized peer-to-peer token ring. Every node is architecturally identical; any node can coordinate any read or write, guaranteeing zero single points of failure.

This architectural study deconstructs Cassandra’s internal systems:

  • Consistent Hashing Token Ring: Murmur3 64-bit token distribution, virtual nodes (vnodes), and token-range replica placement across datacenter racks.
  • Gossip & The Accrual Failure Detector: Asynchronous peer state convergence, generation heartbeats, and probabilistic network health modeling.
  • Storage Engine Internals: Append-only CommitLogs for durable writes, concurrent in-memory MemTables, immutable on-disk SSTables, row-level Bloom filters, partition indexes, and Tombstone garbage collection.
  • Tunable Consistency & Repair Mechanics: Quorum intersection proofs (), Hinted Handoff buffers, asynchronous Read Repair, and anti-entropy Merkle tree background repairs.

This module provides the blueprint for building and operating petabyte-scale masterless distributed storage.

What you will learn

  • Deconstruct Cassandra's masterless Dynamo-style peer-to-peer ring topology and consistent hashing token allocation
  • Analyze Gossip protocol mechanics (Phi Accrual failure detector, SYN/ACK/ACK2 state exchange, generation timestamps)
  • Evaluate tunable consistency levels (ONE, QUORUM, LOCAL_QUORUM, ALL) and calculate read repair and hinted handoff invariants
  • Dissect storage engine write/read paths: CommitLog append, MemTable skiplists, SSTable chunking, Bloom filters, and compaction strategies
STAGE TOPICS

Topics in this chapter