Apache Cassandra

Apache Cassandra

Data modeling, consistency, compaction, repair, vector search 5, multi-DC.

77Articles
77Topics covered
Articles in this category

All 65 articles, sorted alphabetically

ARTICLE · 01

Understanding the CAP Theorem and Cassandra

Distributed systems are the backbone of modern applications, powering everything from social media to online banking.

Read article →
ARTICLE · 02

Cassandra's Vector Search: Unlocking Semantic Understanding

In today’s data-driven world, the ability to search beyond keywords is becoming increasingly crucial.

Read article →
ARTICLE · 03

Cassandra 5.0 New Features, in depth: trie storage, unified compaction, masking and a safe upgrade path

What Apache Cassandra 5.0 changes and how to adopt it: trie memtables and BTI SSTables, Unified Compaction Strategy parameters, SAI and vectors, dynam…

Read article →
ARTICLE · 04

Cassandra Backup + Restore, in depth: restore manifests, RTO arithmetic, new-topology restores, row-level recovery and drills

How to make Cassandra backups restorable: the manifest every snapshot needs, estimating restore time with a worked example, restoring with pinned toke…

Read article →
ARTICLE · 05

Cassandra Backups, in depth: snapshots, incremental backups, commit log archiving, Medusa and restores that work

How Apache Cassandra backups work on disk: hard-linked snapshots, incremental backups, commit log archiving for point-in-time recovery, shipping to ob…

Read article →
ARTICLE · 06

Cassandra BATCH architecture, in depth: mutations, the batchlog, replay, guardrails and timeouts

What a Cassandra coordinator does with a BATCH: grouping into mutations, the logged path through system.batches, replay, size guardrails, BATCH_LOG vs…

Read article →
ARTICLE · 07

Batch Statements, in depth

Using Cassandra CQL batches correctly: logged, unlogged and counter batches, single-partition atomicity, shared timestamps and the delete tie, conditi…

Read article →
ARTICLE · 08

Cassandra bloom filters -- skipping SSTables that can't have the row

Deep-dive on Cassandra bloom filters: the multi-SSTable read problem, probabilistic set-membership, the no-false-negatives property (guaranteed absenc…

Read article →
ARTICLE · 09

Cassandra Bloom Filters, in depth: choosing bloom_filter_fp_chance, sizing off-heap memory, reading tablestats and rewriting SSTables after a change

An operator's guide to tuning Cassandra bloom filters: where the filter sits on the read path, the sizing math, how compaction strategy changes t…

Read article →
ARTICLE · 10

Cassandra's CAP Trade-offs in Practice, in depth: quorum arithmetic, what each partition does to each consistency level, convergence, lightweight transactions and client retries

A failure-scenario playbook for Cassandra's per-request CAP choices: replica and quorum arithmetic for single and multi-datacentre layouts, Unava…

Read article →
ARTICLE · 11

Cassandra Clustering, in depth: clustering columns, on-disk order, slice queries, reversed reads and range deletes

How Cassandra clustering columns order rows inside a partition: how the order lives in memtables and SSTables, the restriction rules CQL enforces, CLU…

Read article →
ARTICLE · 12

Cassandra Commit Log: Write Path, Segments, Sync, Replay

How the commit log works in Cassandra's write path: append before the memtable, fixed-size segments, periodic vs batch sync, segment freeing, rep…

Read article →
ARTICLE · 13

Cassandra Compaction Strategies: STCS vs LCS vs TWCS vs UCS

How to choose a Cassandra compaction strategy: size-tiered (STCS), leveled (LCS), time-window (TWCS) and unified (UCS), amplification, tombstones.

Read article →
ARTICLE · 14

Cassandra consistency levels, in depth: coordinators, quorum overlap, multi-DC and failure modes

How Cassandra consistency levels work on the write and read paths, the R + W > RF overlap rule, multi-DC levels, timeouts versus unavailability, LW…

Read article →
ARTICLE · 15

Cassandra Consistency Levels, in depth: every level for reads and writes, what the coordinator waits for, what the errors mean, and how to set, enforce and observe them

A practical reference to Cassandra consistency levels: ANY to ALL plus SERIAL and LOCAL_SERIAL for reads and writes, blockFor arithmetic per datacente…

Read article →
ARTICLE · 16

Cassandra counters architecture, in depth: counter shards, the leader write path, and why retries overcount

How Cassandra counter columns really work: schema restrictions, the counter context of per-replica shards, the leader replica's locked read-befor…

Read article →
ARTICLE · 17

Counter Columns, in depth: designing counter tables, time-bucketed rollups, pre-aggregation, hot-key splitting and exact totals alongside approximate counts

How to design with Cassandra counter columns: schema rules as design consequences, time-bucketed rollup tables, a pre-aggregating flush in Python, spl…

Read article →
ARTICLE · 18

Cassandra Data Model, in depth: from CQL tables to partitions, rows and timestamped cells, and how last-write-wins, row liveness, static columns and collections really behave

The storage-level data model under CQL: keyspaces, partitions, clustering-ordered rows and timestamped cells, last-write-wins merging, WRITETIME and T…

Read article →
ARTICLE · 19

Cassandra Data Modeling Basics, in depth: primary keys, query-first design, partition sizing, denormalization and a worked order-history model

A first-principles guide to modeling data in Apache Cassandra: what the partition key and clustering columns decide, the query-first method, a worked …

Read article →
ARTICLE · 20

Cassandra: Distributed Systems Lessons, in depth

Seven distributed-systems lessons Cassandra teaches, each tied to a mechanism, a production failure and a drill: last-write-wins and clocks, tombstone…

Read article →
ARTICLE · 21

Cassandra Gossip, in depth: endpoint state, the SYN/ACK/ACK2 round, seeds, phi accrual failure detection and operating it

How Apache Cassandra's gossip protocol works and how to operate it: what each node's endpoint state holds, generations and versions, the thr…

Read article →
ARTICLE · 22

Cassandra Hinted Handoff Architecture in Depth

A 2500-word walkthrough of Cassandra hinted handoff: coordinator stores hints, TTL, delivery, replay, hint storage, relationship to repair.

Read article →
ARTICLE · 23

JVM + GC Tuning for Cassandra, in depth: tracing latency spikes to pauses, where the garbage comes from, non-GC stalls and canary experiments

A diagnostic guide to JVM and garbage collection work on Cassandra: tracing a client latency spike to one node and one stall, Cassandra allocation sou…

Read article →
ARTICLE · 24

Cassandra JVM Tuning in 2026, in depth: G1 on Cassandra 5.0, generational ZGC on JDK 21, heap and off-heap budgets and a tuning loop driven by GC logs

How to tune the JVM under Apache Cassandra in 2026: what Cassandra 5.0 ships for JDK 11 and 17, the JDK 21 generational ZGC profile in the 6.0 pre-rel…

Read article →
ARTICLE · 25

Lightweight Transactions (LWT), in depth: the CQL condition language, reading [applied], conditional batches and partition invariants with static columns

A working reference to compare-and-set in CQL: every condition form (IF NOT EXISTS, IF EXISTS, comparisons, IN, collection elements, UDT fields, CONTA…

Read article →
ARTICLE · 26

Cassandra LWT architecture, in depth: Paxos rounds, SERIAL reads, contention and the unknown-outcome timeout

How Cassandra lightweight transactions work and how to run them: why quorum writes cannot do compare-and-set, the four Paxos v1 round trips, Paxos v2 …

Read article →
ARTICLE · 27

Cassandra LWT: When and How, in depth: a decision matrix, a contention budget, schema shapes, Java driver code and testing

When to use Cassandra lightweight transactions and how to implement them well: a use-case decision matrix, a per-partition contention budget, schema s…

Read article →
ARTICLE · 28

Cassandra Materialized Views, in depth: the base-to-view write path, replica pairing, divergence and safer alternatives

How Cassandra materialized views work and when to use them: the primary-key rules, the base replica's lock, read-before-write and batchlog, cardi…

Read article →
ARTICLE · 29

Cassandra memtable flush architecture

Deep-dive on Cassandra's write path: durability via the append-only commitlog, speed via the in-memory memtable, and the flush that streams a ful…

Read article →
ARTICLE · 30

Migrating from a Relational Database to Cassandra, in depth: query-first schema, backfill, CDC, verification and cutover

How to migrate from PostgreSQL or MySQL to Apache Cassandra without downtime: deciding what to move, deriving query tables from an access-pattern inve…

Read article →
ARTICLE · 31

Cassandra Multi-DC Architecture in Depth

Cassandra multi-DC architecture in depth: deployment patterns, the cross-DC write path, consistency arithmetic, SERIAL vs LOCAL_SERIAL, last-write-win…

Read article →
ARTICLE · 32

Multi-DC Cassandra Topology

Two-region Cassandra deployment. NetworkTopologyStrategy, rack awareness, LOCAL_QUORUM. Full topology with rack layout, snitch config, and replication…

Read article →
ARTICLE · 33

Cassandra Operational Metrics

JMX + Prometheus. Which metrics matter most.

Read article →
ARTICLE · 34

Cassandra Operations Architecture, in depth: control loops, node lifecycle, rolling changes, backups and the runbooks that hold them together

How to operate Apache Cassandra as a system rather than a set of commands: the observe, maintain, change and recover loops, the operator interfaces (n…

Read article →
ARTICLE · 35

Cassandra Pagination, in depth: page size, paging state, stateless web paging, token-range scans and the failure modes of each

How Cassandra pagination works: driver page size versus LIMIT, what the paging state encodes and why no snapshot is held, synchronous and asynchronous…

Read article →
ARTICLE · 36

Cassandra paging -- fetching large result sets safely

Deep-dive on Cassandra paging: the large-result problem, page size, the paging-state cursor, driver auto-paging, cursors-not-offsets (efficient at any…

Read article →
ARTICLE · 37

Cassandra Partition Key Design, in depth: scoring candidate keys, bucketing, sharding hot keys and migrating a bad key

A decision method for Cassandra partition keys: query alignment, cardinality, skew and growth, natural versus composite versus synthetic shard keys, a…

Read article →
ARTICLE · 38

Cassandra Partitioning, in depth: from partition key to token to replicas, routing, range scans and hot partitions

How Cassandra decides where data lives: what a partition is on disk, how the Murmur3 partitioner turns a partition key into a token, how the ring and …

Read article →
ARTICLE · 39

Cassandra Prepared Statements, in depth: the server cache, driver lifecycle, binding rules and the failures they prevent

How Cassandra prepared statements work end to end: statement ids derived from the query text, variables and result metadata, preparing on all nodes an…

Read article →
ARTICLE · 40

Cassandra Query Tracing

TRACING ON to diagnose slow queries. Understand output.

Read article →
ARTICLE · 41

Cassandra read path end-to-end, in depth: coordinator planning, SSTable lookup, merging and read repair

Follow one Cassandra LOCAL_QUORUM read from driver to disk: digest requests, speculative retry, Bloom filters, BIG and BTI indexes, tombstone merging,…

Read article →
ARTICLE · 42

Cassandra Read Repair: Digest Mismatch and Replica Repair

How Cassandra read repair works: digest reads, mismatch, last-write-wins reconcile, write-back to stale replicas, blocking vs background, and its limi…

Read article →
ARTICLE · 43

Cassandra repair architecture

Deep-dive on Cassandra repair: Merkle trees, streaming sessions, full vs incremental, subrange, preview mode, Reaper scheduling, and gc_grace.

Read article →
ARTICLE · 44

Cassandra Repair in 2026, in depth: the gc_grace deadline, full vs incremental, built-in Auto Repair vs Reaper, and repair as a monitored program

How to run Apache Cassandra anti-entropy repair as an operating program in 2026: the gc_grace_seconds deadline arithmetic, choosing full or incrementa…

Read article →
ARTICLE · 45

Replica Placement Strategies, in depth

How Cassandra chooses replicas: SimpleStrategy's ring walk, NetworkTopologyStrategy's rack-distinct walk and rack repeats, a runnable Python…

Read article →
ARTICLE · 46

Cassandra Replication Architecture, in depth: replica placement, NetworkTopologyStrategy, coordinator fan-out and changing RF safely

How Apache Cassandra decides where copies of a partition live and how they stay in sync: SimpleStrategy versus NetworkTopologyStrategy, the rack-aware…

Read article →
ARTICLE · 47

Cassandra SAI Explained: Secondary Indexes Attached to SSTables

How Cassandra SAI works: writes land in the memtable and commit log, each SSTable gets its own index at flush, compaction merges them, range and vecto…

Read article →
ARTICLE · 48

Scaling Cassandra Up + Down, in depth: vertical versus horizontal, capacity signals, adding nodes one at a time, decommission versus removenode versus replace, and the disk arithmetic that decides whether shrinking is safe

How to scale an Apache Cassandra cluster up, out, down and in: vertical versus horizontal trade-offs, the signals that justify a change, the add-node …

Read article →
ARTICLE · 49

Cassandra secondary indexes -- querying beyond the partition key

Deep-dive on Cassandra secondary indexes: the non-key-query problem, the local (per-node) 2i, scatter-gather across all nodes for global queries, card…

Read article →
ARTICLE · 50

Cassandra snitch architecture

Deep-dive on the Cassandra snitch: why topology awareness is the precondition for surviving rack and datacenter failures, the snitch implementations (…

Read article →
ARTICLE · 51

Cassandra speculative retry architecture

Deep-dive on Cassandra speculative retry: per-table latency tracking, PERCENTILE vs fixed vs ALWAYS/NONE policies, the coordinator hedge to a spare re…

Read article →
ARTICLE · 52

Cassandra SSTable Format Architecture in Depth

A 2500-word walkthrough of Cassandra SSTable format: Data, Index, Summary, Filter, Statistics, CompressionInfo, TOC/Digest, and read path.

Read article →
ARTICLE · 53

Cassandra Node Bootstrap: Token Allocation, Streaming, Cleanup

How a new Cassandra node bootstraps: token allocation, streaming its ranges from replicas, zero-copy SSTable transfer, throttling, JOINING state and c…

Read article →
ARTICLE · 54

Cassandra Streaming Operations, in depth: one subsystem behind bootstrap, decommission, rebuild, removenode and repair

How Cassandra streaming works as one subsystem: stream plans and sessions, the operations that use streaming, whole-SSTable versus partition streaming…

Read article →
ARTICLE · 55

Cassandra for Time-Series, in depth: bucketed partitions, multi-bucket reads, TWCS windows, rollups and the failure modes of time-ordered data

How to model time-series data in Apache Cassandra: why it fits, choosing a bucket from write-rate arithmetic, a reference schema, parallel multi-bucke…

Read article →
ARTICLE · 56

Token Ring + Virtual Nodes (vnodes), in depth: computing ownership, walking the ring for replicas, what num_tokens costs in availability, the token allocator and changing num_tokens safely

The Cassandra token ring as arithmetic you can run: how ranges are owned, primary versus effective ownership, rack-aware replica placement, a tested s…

Read article →
ARTICLE · 57

Cassandra Tombstones: gc_grace_seconds, TTL and Zombie Data

How Cassandra tombstones work: deletes and TTL expiry as markers, gc_grace_seconds and compaction, tombstone warn and fail thresholds, zombie data, an…

Read article →
ARTICLE · 58

Cassandra TTL, in depth: per-cell expiry, row liveness, default_time_to_live, the expired-cell purge rule and TWCS whole-SSTable drops

How time-to-live works inside Apache Cassandra: TTLs stored per cell, row liveness and the INSERT versus UPDATE trap, default_time_to_live and TTL 0, …

Read article →
ARTICLE · 59

Cassandra TTL, in depth: retention patterns for applications, from sliding sessions and leases to retention tiers and rewriting the lifetime of existing data

Using Cassandra TTL as an application design tool: setting TTLs safely from driver code, TTL versus DELETE versus dropping tables, sliding-expiration …

Read article →
ARTICLE · 60

Tunable Consistency Worked Examples, in depth: eight replica-by-replica scenarios, the failures each level survives, and how to choose

Cassandra's tunable consistency worked through eight concrete scenarios: QUORUM overlap, a node down, stale ONE reads, a timed-out write that lat…

Read article →
ARTICLE · 61

Cassandra 5 Vector Search, in depth: how ANN queries run inside SAI, what they cost and where they break

How Apache Cassandra 5.0 executes vector similarity search: the VECTOR type and SAI vector index, per-SSTable graphs, the top-K query rules (consisten…

Read article →
ARTICLE · 62

Cassandra vnodes architecture

Deep-dive on Cassandra virtual nodes: how many small tokens per node subdivide the ring, why num_tokens and the rack-aware allocation algorithm contro…

Read article →
ARTICLE · 63

Cassandra vs ScyllaDB in 2026, in depth: where the two CQL databases diverged, and how to check whether your application can still move

Apache Cassandra and ScyllaDB as of October 2026: what they still share, how they now differ on strong consistency (Accord transactions versus Raft-ba…

Read article →
ARTICLE · 64

Write Amplification in Cassandra, in depth

Write amplification in Cassandra in depth: replication, commitlog, flush, compaction, hints and repair as multipliers; STCS, LCS, TWCS and UCS write c…

Read article →
ARTICLE · 65

Cassandra Write and Read Path Architecture in Depth: coordinator, commit log, memtables, SSTables and reconciliation

Follow one Cassandra write and one read end to end: token routing, coordinator fan-out, hints, commit log sync, memtable flush, digest reads, read rep…

Read article →

Views are my own and do not represent any employer, past or present.