When to Use Cassandra and When Not To
Parts 1–9 built up every mechanism Cassandra has — and every cost each one carries. This part turns that into a decision: one workload where Cassandra is unambiguously correct, three where engineers reach for it and shouldn't, where it ends and a lakehouse begins, and the three mistakes teams make even when the choice was right. The consequence worth internalizing is that the decision is never about scale or data shape — it is about the access pattern: who is waiting on the read, whether the new value depends on the old one, and whether every query is known before the schema is.
The Canonical Workload Where Cassandra Is the Correct Answer
IoT Telemetry Platform at Scale
Specifics:
| Write rate | 500,000 devices each writing sensor readings every 5 seconds — ~100,000 writes/second sustained |
|---|---|
| Write shape | Each write is a new row (append-only, no updates) |
| Read shape | Reads are always: "give me all readings for device X between time A and time B" |
| Retention | Data older than 30 days is no longer queried and can be expired |
| Availability | Must survive the loss of an entire datacenter without downtime |
| Latency SLA | Writes under 5ms p99, reads under 20ms p99 |
Why Cassandra Is Correct Here
| Requirement | How Cassandra satisfies it |
|---|---|
| 100k writes/sec sustained | Leaderless, every node accepts writes; commit log + memtable path is designed for this |
| Reads by device + time range | Partition key = (device_id), clustering key = event_time — exactly one partition per device, reads are a sequential scan of sorted data |
| Append-only rows | TWCS is optimal; no tombstones, no conflicts |
| 30-day TTL | Native TTL support; TWCS drops expired SSTables without scanning tombstones |
| Multi-datacenter | NetworkTopologyStrategy with RF=3 per DC; a full DC outage leaves two complete copies |
| Latency SLA | Sequential disk reads on SSD with bloom filter elimination; well within target at this scale |
- Guarantees: Every requirement is met by a native mechanism — leaderless writes, clustering order, TWCS + TTL, NetworkTopologyStrategy — with no workaround layered on top.
- Does not guarantee: That the fit survives a requirement change. Add "readings across all devices in a region" or "correct a past reading" and the workload is no longer this one.
Three Workloads Where Engineers Mistakenly Reach for Cassandra
Mistake 1: "We have a lot of users, so we need Cassandra for our user profile service"
| What they actually have | A user table with 10 million rows. CRUD operations. Queries like: "get user by ID", "get user by email", "get users created in the last 7 days." Occasional UPDATE to change a user's profile. |
|---|
Why Cassandra is wrong here:
- "Get user by email" requires either a separate lookup table (duplication + consistency maintenance) or a secondary index (scatter-gather). Neither is clean.
- Updates to a profile field are not append-only — they create version accumulation and tombstone pressure.
- 10 million rows is trivially served by a single Postgres primary with a read replica. You don't need horizontal write scaling.
- You lose JOINs, foreign keys, and ACID transactions for no benefit.
Mistake 2: "We're building an e-commerce order system and need high availability"
| What they actually need | Users place orders. Inventory must be decremented atomically. An order must not be placed if an item is out of stock. Orders have line items. Payments must be linked to orders. Status transitions (pending → paid → shipped) must be enforced. |
|---|
Why Cassandra is wrong here:
- "Decrement inventory only if quantity > 0" requires a read-modify-write transaction. LWT works for a single partition, but inventory, order, and payment are in different partitions. Multi-partition transactions are not supported.
- Order + line items is a relational model. Denormalizing it into Cassandra requires duplicating data across multiple tables with no transactional guarantee of consistency between them.
- Status transitions are a state machine — exactly what LWT is supposed to handle, but the latency (4–6× normal write) under high order volume becomes a bottleneck, and it still can't span multiple partitions (Part 8).
Mistake 3: "We want a fast analytics database for our reporting dashboard"
| What they actually need | Queries like: "total revenue by region in the last 30 days", "top 10 products by units sold this month", "cohort retention for users who signed up in Q1." These are aggregations, groupings, and multi-dimensional filters over large datasets. |
|---|
Why Cassandra is wrong here:
- Cassandra has no aggregation engine.
SELECT SUM(revenue) FROM orders WHERE region = 'us-east'broadcasts to all nodes and does a full table scan. At any real data volume, this query will time out or kill the cluster. - There is no GROUP BY that performs server-side aggregation efficiently.
- Column-oriented storage (Parquet, ORC) is radically more efficient for aggregations than Cassandra's row-oriented storage.
- Cassandra is optimized for reading one partition at a time. Analytics workloads scan billions of rows across all partitions.
| Mistake | The word that triggered it | What the access pattern actually needs | Use instead |
|---|---|---|---|
| 1 — User profiles | "a lot of users" | Lookups by non-key attributes, in-place updates, joins | PostgreSQL |
| 2 — Order system | "high availability" | Multi-partition atomic read-modify-write | PostgreSQL + PgBouncer; CockroachDB / Spanner |
| 3 — Reporting dashboard | "fast" | Cross-partition aggregation and grouping | Warehouse or lakehouse, fed by CDC |
- Guarantees: Cassandra serves any single-partition read or blind write at scale, regardless of how many users or rows sit behind it.
- Does not guarantee: Lookups by anything but the partition key, atomicity across partitions, or efficient aggregation across the cluster — the three things these workloads actually need.
Cassandra and the Lakehouse: Serving Tier vs. Analytical Tier
Look again at the first two canonical examples from Part 1 — IoT sensor data and user activity feeds. Both are append-heavy, time-ordered, and partitioned by a natural entity key. That is also an exact description of a well-designed Iceberg or Delta Lake table, which is why the question comes up constantly: if this is just an append-only time-series, why not put it in the lakehouse and skip the cluster entirely?
The two look alike on the write side and are nothing alike on the read side.
What Actually Separates Them
| Cassandra | Iceberg / Delta on object storage | |
|---|---|---|
| Unit of read | one partition, or a contiguous slice of one | one or more whole files / row groups, after manifest pruning |
| Read latency | single-digit ms p99 | 100ms at best, realistically seconds — table metadata → manifest list → manifests → Parquet footers → ranged GETs |
| Read concurrency | 100k+ independent keyed reads/sec | tens of concurrent queries; each costs object-store requests, not just CPU |
| Unit of write | one row, durable and visible at ack | a commit — optimistic concurrency on a single table-metadata pointer |
| Write cadence | millions of rows/sec, accepted by any node | files written every N minutes by a streaming job; a faster cadence just buys the small-file problem |
| Visibility lag | none | one commit interval |
| Aggregations, joins, ad hoc | effectively none | the entire point |
The row that decides it is unit of write.
Iceberg's concurrency model is a compare-and-swap on one pointer per table; it has no concept of a single-row write at all. Anything with a real ingest rate is therefore already passing through Kafka and a streaming writer before it reaches the table — the lakehouse is never the thing the producers talk to.
Running the Two Examples Through That
IoT sensor data
The read is "recent readings for this device," issued by a dashboard or an alerting path, thousands of times a second, under a latency SLA. In Iceberg that read is a metadata traversal followed by a file scan — even with day-level hidden partitioning and device_id sorting within each file, you are not serving it in 5ms, and you pay object-store GETs per query rather than a page-cache hit. The ingest side is worse: 100,000 writes/second of individual rows has no expression in a commit-per-batch model.
User activity feeds
The same shape with one extra constraint: the read sits on the hot path of a user-facing screen. A feed that materializes in two seconds is a broken feed.
The Other Four Examples
The remaining four rows of the Part 1 table go through the same test. The question is who is waiting on the read. Two of them add a write-side problem the lakehouse can't handle at all: the new value depends on the old one.
| Example | Who waits on the read | Why a lakehouse can't replace it | Verdict |
|---|---|---|---|
| Messaging inboxes | A user looking at the screen | "Last N messages" has a latency budget of tens of ms. Editing or deleting a message is a free upsert in Cassandra. In Iceberg it's a row-level delete file (merge-on-read) or a rewritten data file (copy-on-write), and either way compaction has to clean up after it. | Cassandra. The lakehouse is only for analytics on the side. |
| Recommendation counters | The online ranking service | views = views + 1 at 50k/sec is a read-modify-write. A commit-per-batch table can only do it by pre-aggregating upstream (Flink windows), which gives up freshness. | Cassandra (or Redis). The lakehouse holds the raw events the counts came from. |
| Time-series metrics | Dashboards and alerting, over recent windows | Recent windows are keyed range reads, so Cassandra fits. But dashboards often aggregate across series, and that is a scan. | Depends. Use Cassandra for per-series serving, and a TSDB or ClickHouse/Druid if the reads are mostly rollups. Long-term history goes in the lakehouse either way. |
| Audit logs | Usually a compliance analyst, occasionally | Often nothing. If nobody reads by key under an SLA, the case for Cassandra goes away. | Often the lakehouse. Use Cassandra only if the product has a live "history for entity X" page. |
Cassandra also wins on availability. It is leaderless and multi-DC, so producers keep writing through a region failure. A lakehouse can tolerate a short write outage because Kafka is buffering upstream, but an inbox or a feed can't.
Where the Comparison Is Actually a Wash
The Production Answer Is a Fork, Not a Choice
Mature systems do not pick one. The stream forks:
Two tiers, one log, different retention answering different questions:
| Serving tier | Analytical tier | |
|---|---|---|
| Answers | "the last hour for device X" | "p95 temperature by region by week, last two years" |
| Retention | 30 days, TTL-expired | years |
| Cost shape | RF=3 on local NVMe — expensive per byte | object storage — roughly 20–50× cheaper per byte |
| Consumers | the application | analysts, notebooks, ML pipelines |
| Schema | fixed at design time, one table per query | schema-on-read, decided per query |
When the Lakehouse Wins Outright
Reach for Iceberg/Delta instead of — not alongside — Cassandra when:
- The questions aggregate across partitions. "Average across all devices," "top N regions by volume." This is Mistake 3 above, restated in lakehouse terms.
- The access patterns aren't known at modeling time. Cassandra demands the query list before the schema; a lakehouse defers that decision to read time, which is the entire reason schema-on-read exists.
- Retention is years but the read rate is near zero. Compliance archives, cold audit history. Replicated NVMe is the wrong medium for data nobody reads.
- The consumers need joins. Cassandra has none; every lakehouse query engine has all of them.
- Guarantees: Cassandra: single-row writes visible at ack and single-digit-ms keyed reads at 100k+/sec. Lakehouse: arbitrary aggregations, joins and ad hoc queries over years of cheap storage.
- Does not guarantee: Either one doing the other's job. Cassandra cannot scan or aggregate; a lakehouse cannot accept a single-row write or serve a keyed read under a millisecond-scale SLA.
Top Three Architectural Mistakes on First Adoption
Mistake 1: Designing the Data Model Before Knowing the Access Patterns
Teams import their existing relational schema into Cassandra — one Cassandra table per SQL table — and then write queries. Every query that isn't a primary key lookup becomes a scatter-gather or requires ALLOW FILTERING.
Mistake 2: Treating Consistency Level Tuning as a Performance Knob Without Understanding the Trade-offs
Teams set consistency_level = ONE everywhere for low latency, then wonder why they see stale reads in production. Or they set consistency_level = ALL for "safety" and discover that a single replica failure makes the entire table unavailable.
The fix: understand that consistency level is a per-operation trade-off between latency, availability, and freshness (Part 3). The default recommendation is:
| Operation | Consistency level | Why |
|---|---|---|
| Writes | LOCAL_QUORUM | durable, fast, tolerates one replica failure per DC |
| Reads | LOCAL_QUORUM | fresh enough, tolerates one replica failure per DC |
| Critical reads where staleness is unacceptable | QUORUM | cross-DC, higher latency |
Mistake 3: Underestimating Operational Complexity
Teams adopt Cassandra attracted by its write throughput, then discover:
- Repair must be scheduled and monitored or data diverges permanently (Part 9)
- Compaction strategy must match the workload or read latency degrades over time (Part 6)
- Partition size must be bounded at design time or the cluster develops hot spots (Part 7)
- Schema changes are propagated eventually, not atomically — in-flight writes during a schema migration can produce inconsistencies
- JVM tuning (heap size, GC settings) is non-trivial and wrong settings cause 10-second GC pauses
- Capacity planning is harder than Postgres — you must account for compaction overhead, repair I/O, and gossip overhead in addition to client traffic
- Guarantees: A query-first model,
LOCAL_QUORUMon both sides, and a team (or vendor) that owns repair and compaction gives you the write throughput and availability Cassandra advertises. - Does not guarantee: That any of it is self-maintaining. Skip repair, mismatch compaction, or leave partitions unbounded and the cluster degrades silently — it doesn't fail fast.