All questions
Showing of 41What is the ring architecture in Cassandra?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Cassandra places its nodes on a logical ring of tokens, and each node owns one or more token ranges. Cassandra hashes a row's partition key into a token and stores the row on the node that owns that range. This is consistent hashing.
There is no master node, so there is no single point of failure. Nodes share cluster state through the gossip protocol, so each node knows about every other node and can handle any request. Each row is replicated to several nodes for fault tolerance.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are tombstones in Cassandra?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A tombstone is a marker Cassandra writes when you delete data. Deletes can't remove data from every replica at once, so Cassandra records the delete as a new write with a timestamp.
A tombstone is kept for the table's gc_grace_seconds, which defaults to 10 days. That grace period lets a replica that missed the delete receive it through repair, so the deleted data can't come back as a zombie. After the grace period, compaction removes the tombstone and the data it covers.
Too many tombstones slow down reads, because a read has to scan past them.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain replication in Cassandra.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Cassandra stores several copies of each row on different nodes, so the data survives node failures. The replication factor (RF) sets how many copies exist. With an RF of 3, each row lives on 3 distinct nodes.
Each keyspace has a replication strategy that picks the nodes for the copies. SimpleStrategy is meant for test clusters, and NetworkTopologyStrategy is for production, with one or more datacenters.
Every replica can accept writes, and no copy is the primary. A client can send a request to any node, which acts as the coordinator and forwards it to the replicas that store the data.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is the difference between a partition key and clustering key?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
The partition key picks a row's partition and the nodes that store it, and the clustering key sorts the rows inside that partition. Cassandra hashes the partition key to pick the replica nodes, and every row with the same partition key lives in one partition.
CREATE TABLE events (
user_id UUID,
event_time TIMESTAMP,
event_type TEXT,
data TEXT,
PRIMARY KEY (user_id, event_time, event_type)
);
Here user_id is the partition key, and event_time and event_type are clustering keys. All events for one user are stored together, sorted by time and then by type.
An efficient query gives the full partition key, because by default CQL refuses a query that would scan every partition. It can then restrict the clustering keys in the order they are declared, such as every event after a given time. You fix the clustering order when you create the table and can't change it later.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain different data types available in Cassandra.
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
The Cassandra Query Language (CQL) has native types for single values and collections for groups of values. You can also define your own types and use tuples.
The native types:
- Text:
TEXT,VARCHARandASCII. - Small integers:
TINYINTandSMALLINT. - Large integers:
INT,BIGINTandVARINT, which has no size limit. - Other numbers:
FLOAT,DOUBLEandDECIMAL, a variable-precision decimal. - Time:
TIMESTAMP,DATEandTIME. DURATIONfor a length of time.- Identifiers:
UUIDandTIMEUUID. BOOLEANfor true or false, andBLOBfor binary data.INETfor an IP address.COUNTER, which you can only increment or decrement.VECTOR, an array of floats for vector search, added in Cassandra 5.0.
The collections are SET<type> for sorted unique values, LIST<type> for values ordered by position that allow duplicates, and MAP<key_type, value_type> for key-value pairs.
User-defined types (UDTs) group named fields, and tuples group values without names.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Explain the role of the coordinator node.
What are the main differences between Cassandra and traditional RDBMS?
What is TTL in Cassandra?
Explain the CAP theorem and how Cassandra fits into it.
Explain partitioning in Cassandra and the role of partition keys.
What are the different consistency levels in Cassandra?
Describe the write path in Cassandra.
Explain the read path in Cassandra.
What is compaction in Cassandra and why is it important?
What are the limitations of Cassandra's data model?
Explain the concept of eventually consistent reads.
What is hinted handoff in Cassandra?
What is the gossip protocol in Cassandra?
How do you model a one-to-many relationship in Cassandra?
What is read repair and when does it occur?
What is the difference between SimpleStrategy and NetworkTopologyStrategy?
Explain counter columns in Cassandra.
What are User Defined Types (UDTs) in Cassandra?
How do you implement pagination in Cassandra?
What is the purpose of bloom filters in Cassandra?
How do you backup and restore data in Cassandra?
How does Cassandra handle schema changes?
How do you monitor Cassandra cluster health?
What is nodetool repair, and why do you need to run it regularly?
When would you use a secondary index, SAI or a materialized view in Cassandra?
What does ALLOW FILTERING do, and why is it dangerous?
Explain the role of a snitch in Cassandra.
What happens when you add or remove a node from a Cassandra cluster?
What are the key factors to consider when designing a Cassandra data model?
How do you handle large partitions in Cassandra?
How do you handle time-series data in Cassandra?
How do you troubleshoot performance issues in Cassandra?
Explain the concept of vnodes (virtual nodes) in Cassandra.
What is a lightweight transaction (LWT) in Cassandra?
How do you optimize Cassandra for write-heavy workloads?
What is the difference between batches and transactions in Cassandra?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
36 of 41 Cassandra answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.