Home › Blog › Cassandra Interview Questions (2026): 30 Questions on Data Modeling, Consistency and Repair

Cassandra Interview Questions (2026): 30 Questions on Data Modeling, Consistency and Repair

Cassandra interview questions test one idea above all: you design tables around the queries you will run, because data is placed by partition key and there are no joins. Expect the rest to follow from it: tunable consistency, the write and read path, compaction, tombstones and repair.

Cassandra interview questions test one idea above all: you design tables around the queries you will run, because data is placed by partition key and there are no joins. Expect the rest to follow from it: tunable consistency, the write and read path, compaction, tombstones and repair. As of November 17, 2026, the Apache Cassandra download page lists 5.0 as the latest GA version (5.0.9, released August 7, 2026), with Storage Attached Indexes, vector search, trie memtables and SSTables, the Unified Compaction Strategy and JDK 17 support among its new features.

Below are 30 questions by level, five production scenarios and how interviews test this. Compare the document model in MongoDB interview questions and the managed key-value model in DynamoDB interview questions.

Cassandra interview questions: fundamentals (1–10)

  1. What is Cassandra and what is it good at? A distributed wide-column database with no single point of failure: every node can coordinate requests. It is good at very high write throughput, multi-datacenter replication and predictable queries by key. It is weak at ad hoc queries, joins and aggregates across partitions.
  2. Partition key versus clustering key? In PRIMARY KEY ((user_id), event_time), user_id is the partition key: it is hashed to a token that decides which nodes store the row. event_time is a clustering key that orders rows inside the partition.
  3. How is data distributed? Each node owns token ranges on a ring; the default partitioner (Murmur3) hashes the partition key to a token. With virtual nodes each node owns many small ranges; the 5.0 cassandra.yaml sets num_tokens: 16.
  4. What is the replication factor, and which strategy should you use? The number of copies of each row. NetworkTopologyStrategy sets it per datacenter and is the production choice; SimpleStrategy is for single-datacenter testing.
  5. What are consistency levels? How many replicas must answer a read or acknowledge a write: ONE, QUORUM, LOCAL_QUORUM, EACH_QUORUM, ALL, LOCAL_ONE and others. You choose per request, trading latency and availability against consistency.
  6. When are reads strongly consistent? When read replicas plus write replicas exceed the replication factor (R + W > RF). With RF 3, QUORUM writes and QUORUM reads (2 + 2 > 3) overlap on at least one up-to-date replica.
  7. Describe the write path. The coordinator sends the write to replicas; each appends to the commit log for durability and writes to the memtable in memory, then acknowledges. Memtables flush to immutable SSTables on disk. Writes are sequential, which is why they are fast.
  8. Describe the read path. The coordinator queries replicas per the consistency level. Each replica checks the memtable and the SSTables that might hold the partition (bloom filters skip the rest), merges cells by timestamp and returns the newest; the coordinator reconciles replies.
  9. What is a tombstone? A deletion marker. Deletes and TTL expiry write tombstones rather than removing data; compaction drops them after gc_grace_seconds, which defaults to 864000 seconds (10 days). Many tombstones in a partition slow reads.
  10. Why does query-first data modeling matter? There are no joins and only limited filtering, so you denormalize: one table per access pattern, duplicated data, written together. Start from the list of queries, then design keys.

Intermediate Cassandra questions (11–20)

  1. What is compaction, and which strategies exist? Merging SSTables to drop overwritten data and expired tombstones. SizeTiered (the default when none is set) suits write-heavy tables; Leveled suits read-heavy ones; TimeWindow suits time series with TTL; Unified Compaction, new in 5.0, is designed to cover these cases with one tunable strategy.
  2. What are hinted handoff, read repair and anti-entropy repair? Hints: the coordinator stores writes for a down replica and replays them later (the 5.0 max_hint_window default is 3 hours). Read repair fixes mismatches seen during reads. Anti-entropy repair (nodetool repair) compares replicas with Merkle trees and must run regularly.
  3. Why must repair run within gc_grace_seconds? If a replica misses a delete and the tombstone is purged elsewhere before repair, the old value can come back as "zombie" data. Repairing every node within the grace period prevents it.
  4. Why are large partitions a problem? A partition lives on the same replicas, so a huge one creates hotspots, slow reads, heap pressure and slow repairs. Bound partitions by bucketing, for example PRIMARY KEY ((sensor_id, day), ts). Commonly cited guidance keeps partitions in the tens of megabytes.
  5. What does ALLOW FILTERING do? It lets a query filter on columns outside the key by scanning, which can read every partition. Fine for small or bounded data; in production it usually means a missing table.
  6. Secondary indexes, SAI or materialized views? Legacy secondary indexes are local per node and scale poorly for high-cardinality columns. Cassandra 5.0 adds Storage Attached Indexes (CREATE INDEX ... USING 'sai'), which also power vector search. Materialized views are marked experimental and disabled by default in cassandra.yaml.
  7. What are lightweight transactions? Compare-and-set with Paxos, such as INSERT ... IF NOT EXISTS or UPDATE ... IF balance = 10, using SERIAL or LOCAL_SERIAL consistency. They are linearizable for one partition and cost several round trips, so use them sparingly.
  8. Logged versus unlogged batches? Batches are for atomicity, not speed. A logged batch guarantees all statements eventually apply, even across partitions, at extra cost. An unlogged batch to a single partition is efficient; unlogged multi-partition batches overload the coordinator.
  9. How do TTLs work? USING TTL 86400 or a table's default_time_to_live expires cells, which become tombstones. Pair TTL-heavy time series with TimeWindow compaction so whole SSTables expire together.
  10. What is a snitch? It tells Cassandra each node's datacenter and rack so replicas are placed across failure domains and requests route to nearby nodes. GossipingPropertyFileSnitch is the usual production choice; 5.0 added a snitch for Microsoft Azure.

Experienced and senior Cassandra questions (21–30)

  1. How do you model time series data? Partition by entity plus a time bucket, cluster by timestamp descending, set a TTL and use TimeWindow compaction. Size buckets so each partition stays bounded at your write rate.
  2. How do you model a lookup by two different keys? Two tables, such as users_by_id and users_by_email, written together, with a logged batch if they must stay in step. Duplication is normal in Cassandra.
  3. Which consistency level for a multi-datacenter app? Usually LOCAL_QUORUM for reads and writes: strong within the local datacenter without waiting on cross-region latency. EACH_QUORUM writes are for data that must be confirmed in every datacenter.
  4. How do you add a node or a datacenter? Bootstrap a new node and let it stream its token ranges, then run nodetool cleanup on the old owners. For a new datacenter, add it to the keyspace replication, then run nodetool rebuild on its nodes.
  5. What are counters and their limits? Counter columns support increments, but they live in dedicated counter tables, are not idempotent (a retried increment can double count) and cannot take a TTL.
  6. How does gossip work? Nodes exchange state with a few peers each second, spreading membership, liveness and load. The phi accrual failure detector marks nodes down based on missed heartbeats.
  7. What is the coordinator node? The node that receives the client request. It forwards to replicas, waits for the consistency level and returns the result; token-aware drivers send each request straight to a replica.
  8. Why prefer idempotent writes? Drivers retry on timeouts, and a timed-out write may still have applied. Plain inserts and updates are idempotent; counter updates, list appends and non-deterministic values such as now() are not.
  9. What is new in Cassandra 5.0 that interviewers ask about? Storage Attached Indexes, a vector data type with similarity functions, the Unified Compaction Strategy, trie memtables and SSTables, JDK 17 support, dynamic data masking and more guardrails.
  10. How do you monitor a cluster? Read and write latency percentiles, pending compactions, dropped messages, tombstone warnings, hints in flight, disk usage, GC pauses and repair status, using nodetool plus JMX metrics in a dashboard.

Cassandra scenario and troubleshooting questions

Reads on one table slowed sharply after a cleanup job. The job deleted many rows, leaving tombstones that reads must scan. Check tombstone warnings in the logs, change the model so deletes drop whole partitions or use TTL with TimeWindow compaction, and let compaction purge after the grace period.

One node is much hotter than the others. Look for a hot partition key (a celebrity user, a global counter) or a huge partition with nodetool tablestats and the 5.0 sstablepartitions tool. Fix with a better key or bucketing.

Deleted data came back. Classic zombie data: repair did not run within gc_grace_seconds, so a replica that missed the delete resurrected the old value. Run regular repairs and repair a node fully before it rejoins after a long outage.

Writes time out at QUORUM during a node failure. With RF 3 one node down still leaves a quorum; two down does not. Check how many replicas of the affected ranges are up, the per-datacenter replication settings, and whether the client uses QUORUM where LOCAL_QUORUM was intended.

A query needs ALLOW FILTERING to work. Treat it as a modeling gap. Add a table keyed for that query, or an SAI index if the filter is selective, rather than scanning the cluster.

How Cassandra interviews test this

FormatWhat it usually looks likeHow to prepare
Concept Q&APartition versus clustering keys, consistency levels, write and read pathExplain R + W > RF with numbers; draw the write path
Data modeling"Here are five queries; design the tables"List queries first, then keys; show duplication and bucket sizing
OperationsRepair, tombstones, compaction choices, adding nodesKnow nodetool basics and why repair cadence matters
System designA chat, feed or IoT store where Cassandra is one componentPractice justifying it against alternatives; see system design building blocks

Interviews often pair Cassandra with caching; Redis interview questions covers that side.

Where CoPilot Interview fits

CoPilot Interview is an AI interview assistant. Its free AI mock interview builds Cassandra and data modeling questions from your résumé and the job description, reads them aloud and scores each spoken answer out of 10, which is a fast way to find the answers above that you know but cannot yet explain cleanly under pressure. The browser demo has 145 practice questions in 10 tracks, scores typed answers out of 10 and needs no signup. The free plan gives 15 minutes a day of live help in sessions of up to 15 minutes, with AI mock interviews included. Paid plans are Standard at $24.99 a month and Pro at $39.99 a month, in the desktop app for Windows 10/11 and macOS 12 or later.

Use it to practice. Online assessments, proctored tests, take-home tasks with rules and AI-led rounds forbid outside help, so prepare for those instead of bringing a tool. For any live interview, follow your employer's rules.

Disclosure: CoPilot Interview is our product, so weigh what we say about it accordingly.

Frequently asked questions

What are the most common Cassandra interview questions?

Partition and clustering keys, consistency levels and R + W > RF, the write and read path, tombstones and gc_grace_seconds, compaction strategies, repair, and query-first data modeling.

What is the latest version of Apache Cassandra?

On November 17, 2026, the project's download page listed Cassandra 5.0 as the latest GA version, with 5.0.9 released August 7, 2026. Documentation for 6.0 was available in alpha.

Is Cassandra strongly consistent?

It is tunably consistent. Reads are strongly consistent when read and write replica counts together exceed the replication factor, such as QUORUM writes and QUORUM reads; lightweight transactions add compare-and-set for one partition.

Cassandra or MongoDB?

Cassandra suits huge write volumes, multi-datacenter replication and known query patterns; MongoDB suits flexible documents, richer ad hoc queries and secondary indexes. The access pattern decides.

How do I practice Cassandra data modeling?

Take an app you know, list every query it runs, design one table per query with explicit partition and clustering keys, then estimate each partition's size at a year of data.

Practice this interview before the real one

The AI mock interview builds questions from your resume and the job description, reads them aloud and scores each spoken answer out of 10. Included on the free plan.

Start a mock interview