If You Last Used Cassandra 3.11, You Might Not Recognize It Today
Apache Cassandra 5.0 and the upcoming 6.0 radically shift the database's operational model with native indexing, auto-repair, and cross-partition transactions.
Deep dive
- SAI replaces the traditionally discouraged secondary indexes, providing more performant query filtering.
- UCS simplifies compaction tuning, allowing operators to adjust performance parameters without full re-compaction.
- Built-in Auto Repair eliminates the dependency on external tools like Cassandra Reaper for scheduling repairs.
- Accord promises strict serializability across partitions, moving toward stronger consistency guarantees.
- Transactional Cluster Metadata in 6.0 removes ambiguity in topology changes by moving away from gossip-only propagation.
Decoder
- SAI (Storage-Attached Indexing): A modern indexing implementation that integrates directly with the storage engine for better performance compared to legacy secondary indexes.
- UCS (Unified Compaction Strategy): A flexible compaction strategy that replaces the need to choose between older strategies like STCS or LCS.
- Accord: A protocol for distributed transactions designed to provide strict serializability without the performance costs of traditional multi-phase commit approaches.
- SSTable: Sorted String Table, the immutable file format used by Cassandra for storing data on disk.
Original article
If You Last Used Cassandra 3.11, You Might Not Recognize It Today
If you learned Cassandra around version 3.11, the advice was fairly consistent: design tables around queries, be careful with secondary indexes, choose a compaction strategy for each workload, and arrange repair scheduling yourself. For conditional updates, use lightweight transactions. For transactions spanning multiple partitions, expect to do more work outside the database.
In consulting work, I still encounter 3.11 clusters operated according to that model. Much of it remains useful, but several limitations behind those recommendations have changed. Cassandra now has storage-integrated indexing, vector search, a more flexible compaction strategy, and built-in repair scheduling. The 6.0 work goes further into cluster metadata and transactions.
As of September, 2026, Apache Cassandra 5.0.9 is the latest GA release. Cassandra 6.0 remains pre-GA, with alpha builds available. That distinction matters: SAI is something to evaluate on the stable release; Accord is a reason to follow and test the next one.
The interesting part is not that Cassandra gained more configuration knobs. It is that several old assumptions about how Cassandra must be queried and operated have started to loosen. A rough comparison looks like this:
| Area | What changed | Release |
|---|---|---|
| Streaming | An eligible whole SSTable can use a zero-copy transfer path | 4.0 |
| Operational limits | Guardrails provide configurable warnings and failures | 4.1 |
| Secondary indexing | Storage-Attached Indexing, or SAI | 5.0 |
| Compaction | Unified Compaction Strategy, or UCS | 5.0 |
| Similarity queries | Native vectors and approximate nearest-neighbor search | 5.0 |
| Repair scheduling | Auto Repair, with explicit opt-in in the 5.0 backport | 5.0.8+ |
| Cluster metadata | Transactional Cluster Metadata | 6.0 work |
| Cross-partition transactions | Accord integration | 6.0 work |
I wrote about some of the older pitfalls in 7 mistakes when using Apache Cassandra. The useful question now is which advice still follows from Cassandra's architecture and which reflected limitations of an older implementation.
Cassandra 4.0 improved the cost of moving data
Streaming transfers data between nodes during bootstrap, replacement, rebuild, repair, and topology changes. In a large cluster, it determines how long a node takes to become useful and how quickly lost replica data can be restored.
Cassandra 4.0 introduced a zero-copy streaming path for eligible whole SSTables. Instead of deserializing their contents into Java objects and serializing them again, Cassandra can transfer the files more directly. Partial transfers and other cases still need the appropriate streaming path; the optimization does not apply to every transfer.
The 4.0 streaming documentation reports roughly a fivefold improvement in the benchmark used to introduce the feature. That is not a capacity estimate for every cluster, but it explains why the change mattered: less allocation and CPU work can leave more of the transfer limited by storage and network throughput.
For a node holding terabytes of data, faster streaming can shorten replacement and reduce the time spent with missing replicas. It is an operational improvement even if the application's CQL stays exactly the same.
Guardrails move some limits into the database
Older Cassandra deployments often depended on conventions enforced in code review or runbooks. Avoid creating hundreds of tables. Keep collections bounded. Do not let an application issue queries over an uncontrolled number of partitions. Use ALLOW FILTERING carefully.
The Guardrails Framework introduced in 4.1 lets operators express some of these rules in Cassandra itself. Depending on the guardrail, a configuration can warn, reject an operation after a threshold, or disable a feature. Examples include table and index counts, collection sizes, and the number of partition keys selected by a query. ALLOW FILTERING can be disabled.
A warning gives an application team a chance to fix growing usage before it reaches the failure threshold. A rejection prevents an operation that exceeds the configured limit. Neither replaces workload design, but both are more reliable than assuming every developer has read the same operational guide.
Secondary-index advice needs to distinguish SAI from older indexes
If you learned Cassandra years ago, there is a good chance somebody told you: Don't use secondary indexes.
That advice was often justified. Traditional Cassandra secondary indexes could behave poorly at scale, especially when queries had to scatter across many partitions or index cardinality did not match the workload. Experienced teams often preferred another Cassandra pattern: create another table containing exactly the shape required by the query.
Suppose we have users:
CREATE TABLE users (
id uuid PRIMARY KEY,
country text,
age int,
status text,
name text
);
and we need queries by country and age. The traditional Cassandra answer might be another table users_by_country_and_age with an appropriate partition and clustering key.
Cassandra 5.0 adds Storage-Attached Indexing. We can index the columns used for filtering:
CREATE INDEX users_country_idx
ON users(country)
USING 'sai';
CREATE INDEX users_age_idx
ON users(age)
USING 'sai';
CREATE INDEX users_status_idx
ON users(status)
USING 'sai';
SAI integrates indexes with memtables and SSTables. Reads combine results from those structures, and the index lifecycle follows the storage engine's flushes and compactions. It supports numeric ranges, combinations of indexed predicates, collection predicates, and text equality. For some access patterns, that can remove the need for an additional query-specific table.
An index does not eliminate query fan-out
SAI changes how Cassandra finds matching rows. It does not make a query over many partitions equivalent in cost to a lookup using one partition key. The physical layout remains different. A table partitioned by country, with age as a clustering column, can serve this query from the relevant country's replica set. In the users table, rows remain partitioned by ID, so an indexed query can require work across multiple token ranges.
UCS makes compaction behavior easier to adjust
Cassandra operators have traditionally chosen among several compaction strategies: STCS for write-heavy workloads, LCS for lower read amplification, and TWCS for time-series data. Cassandra 5.0 adds Unified Compaction Strategy. The UCS documentation recommends it for most workloads and describes how to configure behavior resembling the older strategies.
UCS exposes the tiered-versus-leveled trade-off through scaling parameters. Positive values favor tiered behavior, negative values favor leveled behavior, and different levels can use different settings. Sharding allows compaction work to run in parallel and helps control SSTable sizes on nodes holding large datasets.
Vector search can stay next to operational data
Cassandra 5.0 introduces a native vector type and approximate nearest-neighbor search through SAI. A product can store both its operational fields and an embedding. Keeping the record and embedding together can avoid copying that data into a second database purely for vector retrieval.
The most relevant case is an application that already stores a large operational dataset in Cassandra and wants similarity queries over it. That does not settle the choice of retrieval system. Approximate search quality, filtering, latency, update behavior, and operational cost still need evaluation.
Auto Repair adds built-in scheduling
Cassandra replicas can temporarily diverge. Auto Repair, developed through CEP-37 for 6.0 and backported to 5.0.8, moves that orchestration into Cassandra. It supports full, incremental, and preview repair scheduling, token-range splitting, repair history, and table priorities. A built-in scheduler reduces the need to operate a separate orchestration service.
Cassandra 6.0 orders cluster metadata changes
Transactional Cluster Metadata, defined in CEP-21, introduces a Cluster Metadata Service and an ordered log of transformations. Nodes apply committed metadata changes in that order. This provides a common history for changes such as schema updates and token ownership transitions. Gossip still has a role; it is no longer expected to establish the authoritative order of critical metadata changes.
Accord extends the transaction model across partitions
CEP-15 introduces Accord for general-purpose transactions with strict serializability. It targets a leaderless protocol with a one-WAN-round-trip fast path under normal conditions. It allows Cassandra to coordinate the conditional debit and credit as one transaction. Strict serializability means committed transactions behave as if executed in a serial order that also respects real-time ordering.
What still needs the same care
Partition keys still determine data placement. Uneven traffic can produce hot partitions, and large partitions remain expensive to read, compact, and move. Denormalization remains useful for predictable, frequent queries. Tombstones and TTLs still affect reads, compaction, and repair.
Returning from 3.11
For someone running 3.11, Cassandra 5.0 is the practical release to evaluate first. SAI, UCS, and vector search are already available. There is also a maintenance reason to move: Apache announced the end of life of the 3.x series with 5.0. Plan the move through a supported 4.x release before 5.0. I would keep the version upgrade separate from schema and indexing changes, then compare representative queries and operational tasks on the upgraded cluster.
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi