Introduction & Fundamentals
What is a node in Cassandra?
What is Apache Cassandra and what problem does it solve?
What is nodetool and what are its key capabilities for managing and monitoring Cassandra nodes?
What is Apache Cassandra, and what are its core design principles?
Can you explain why Cassandra is called a NoSQL database?
What is the role of the CQL (Cassandra Query Language) in Cassandra?
What is Cassandra and when should you use it?
Why was Apache Cassandra developed?
What is CQLSH and why is it used?
What are the origins of Cassandra and how did Dynamo and Bigtable influence its design?
Nosql Comparisons & Cap Theorem
How does Cassandra differ from traditional relational databases?
How does CQL resemble and differ from SQL?
Explain the concept of eventual consistency in Cassandra.
Explain the CAP theorem and where Cassandra typically fits (AP with tunable consistency).
How does Cassandra differ from MongoDB?
Describe the tradeoffs between eventual consistency and strong consistency in Cassandra.
How does Cassandra compare with HBase in terms of architecture and data model?
How do modern databases like Cassandra address the challenges posed by the CAP theorem?
How does Cassandra compare to a relational database or other NoSQL databases (MongoDB, HBase, DynamoDB) in terms of data model, consistency, and use cases?
Compare Apache Cassandra with Amazon DynamoDB in terms of architecture, data model, consistency models, scalability strategies, use cases, and pros and cons.
How does Cassandra relate to ScyllaDB and what makes ScyllaDB Cassandra-compatible?
Use Cases & Trade Offs
Where does Cassandra fit, and what are its ideal use cases?
What are the advantages and disadvantages of using Cassandra?
When would you not use Cassandra?
What are Cassandra's core design goals and key strengths, such as linear scalability, no single point of failure, high write throughput, multi-datacenter distribution, and tunable consistency?
What are Cassandra's ideal use cases and when should you NOT use Cassandra?
When would you choose Cassandra over a traditional relational database, and what are the key trade-offs?
What are common failure modes and anti-patterns in Cassandra, such as large partitions, too many tombstones, secondary-index misuse, and SELECT with ALLOW FILTERING?
Cluster Architecture & Topology
What is a coordinator node and what does it do in a request?
Explain the concept of a Cassandra cluster, nodes, and datacenters.
What is a data center in Cassandra?
What are seed nodes in Cassandra and what role do they play?
How does Cassandra achieve high availability and no single point of failure?
How does the ring architecture work in Cassandra?
How does Cassandra use datacenters and racks in its topology?
Explain the masterless, peer-to-peer architecture of Cassandra. Why is it designed this way?
What is the primary consideration when determining the optimal number of nodes in a Cassandra cluster?
Data Modeling
Explain Cassandra's data model: Keyspaces, Tables (Column Families), Rows, Partition Keys, and Clustering Columns.
What is the significance of the Primary Key in Cassandra, and how is it composed?
Why does Cassandra not support JOINs or referential integrity, and what are the implications for data modeling?
Explain the concept of query-driven data modeling in Cassandra. Why is it crucial, and how does it differ from relational modeling?
Differentiate between a Partition Key and Clustering Columns. How do they influence data storage and retrieval?
Explain the concept of data denormalization in Cassandra.
Explain the concept of Primary Keys in Cassandra and why Cassandra does not support Foreign Keys or referential integrity.
What are the challenges in Cassandra data modeling?
Explain how Cassandra handles schema changes and what are the best practices.
How does Cassandra's wide-column store architecture make it suitable for time-series data?
What are wide partitions or wide rows in Cassandra? What problems are associated with them, and how can they be mitigated?
How would you design a data model in Cassandra for a specific use case, considering query patterns and data relationships?
How would you model time-series data effectively in Cassandra?
Keyspaces Tables & Keys
What is a keyspace in Cassandra and what does it define (replication strategy, replication factor, durable writes)?
What is a table (column family) in Cassandra?
What is a partition key in Cassandra and why is it important?
What is a clustering key in Cassandra and what is its role?
What is a composite/compound partition key and when would you use one?
Why are all writes in Cassandra considered upserts, and what does that mean for INSERT versus UPDATE?
What is a cell in Cassandra, and how do cell-level timestamps work?
How do you control the on-disk sort order of rows within a partition using CLUSTERING ORDER BY?
Why is clock synchronization (NTP) important in a Cassandra cluster, and what can go wrong if clocks drift?
What is the durable_writes keyspace option, and what is the effect of disabling it?
Cql Types & Features
What is the purpose of TTL (Time to Live) in Cassandra?
What collection types and UDTs does Cassandra support?
What data types does CQL support, and are there any Cassandra-specific types you should know?
What is a Static Column, and what is its primary use case?
What are the different types of counters in Cassandra, and when would you use each type?
What is a TimeUUID in Cassandra, and when would you use it instead of a regular UUID?
What are frozen versus non-frozen collections in Cassandra, and when do you use each?
Why are counters treated specially in Cassandra, and what limitations do they have?
Explain the purpose and usage of User-Defined Functions (UDFs) and User-Defined Aggregates (UDAs) in Cassandra.
What are virtual tables in Cassandra, and what kind of information do they expose?
Indexing & Querying
What is indexing in Cassandra?
What are Materialized Views in Cassandra, and how do they work?
What is ALLOW FILTERING in CQL, and why is its use generally discouraged in production?
What are Prepared Statements in CQL, and what benefits do they offer?
How do you handle transactions in Cassandra?
When is it appropriate to use an index in Cassandra, and when should it be avoided?
How does paging work in Cassandra, and why is it important for large result sets?
Explain the purpose and limitations of Secondary Indexes in Cassandra. When would you use them, and what are the alternatives?
What are Storage-Attached Indexes (SAI) in Cassandra, and how do they improve on older secondary indexes?
Consistency Levels
What is a consistency level in Cassandra? Give an example.
What is tunable consistency in Cassandra, and why is it a key feature?
What are the different consistency levels in Cassandra, with examples like ONE, QUORUM, LOCAL_QUORUM, ALL, and SERIAL?
Explain the benefits and trade-offs of using tunable consistency levels in Cassandra.
What is tunable consistency in Cassandra and what consistency levels are available?
How does Cassandra resolve conflicts between concurrent writes, and what is the last-write-wins model?
What happens when a query's requested consistency level cannot be satisfied, and what is an UnavailableException?
What is the difference between ONE and LOCAL_ONE consistency levels?
How does Cassandra handle data consistency in a multi-datacenter environment, particularly with LOCAL_QUORUM and EACH_QUORUM?
How does the R + W > N rule provide strong consistency in Cassandra?
How does Cassandra handle consistency when data is written to multiple nodes, and what trade-offs are involved?
How does the consistency level ANY relate to hinted handoff, and what are its risks?
What is the difference between SERIAL and LOCAL_SERIAL consistency in lightweight transactions?
Replication & Distribution
What is the Replication Factor, and how does it relate to data availability and durability?
What is data replication in Cassandra and why is it important?
How does data get distributed across nodes in a Cassandra cluster, and what role do partitioners and token ranges play?
Explain the difference between SimpleStrategy and NetworkTopologyStrategy replication strategies. When would you use each?
What are Virtual Nodes (vnodes), and what benefits do they provide?
How does Cassandra ensure data availability and fault tolerance?
How does Cassandra handle node failures?
How does multi-datacenter replication work and why use LOCAL_QUORUM?
How does consistent hashing map data to nodes in Cassandra?
How does Cassandra ensure data durability and fault tolerance through replication?
What are partitions and tokens in Cassandra?
What are the different types of partitioners in Cassandra?
What is a partitioner in Cassandra and what does Murmur3Partitioner do?
How are replicas chosen around the ring in Cassandra?
How do multi-datacenter operations and disaster recovery work in Cassandra?
Gossip Failure Detection & Snitches
What states can a node show in nodetool status (e.g. UN, DN, UJ), and what do they mean?
What is a snitch and what are the different types of snitches?
Explain the Gossip protocol in Cassandra. What is its role, and how does it help with failure detection?
How does failure detection work in Cassandra and what is the phi accrual failure detector?
Storage Engine Read & Write Paths
What is the difference between a memtable and an SSTable?
Explain the Cassandra write path involving the Commit Log, Memtable, and SSTables.
What are SSTables, what are their characteristics, and what components do they typically include?
How do Bloom Filters work in Cassandra, and what problem do they solve for reads?
What is a Memtable, and what happens when it's full?
How does Cassandra use SSTables and what is their role in the data lifecycle?
What happens when a Cassandra node restarts, and how does commit log replay ensure durability?
What is Hinted Handoff, and how does it contribute to write availability during temporary node failures?
Explain the Cassandra read path, detailing how data is retrieved from Memtables and SSTables.
Explain Read Repair (blocking and background). How does it help maintain data consistency?
How does Cassandra's LSM-tree storage engine work?
What are Read Amplification and Write Amplification in the context of Cassandra's storage engine?
What role do bloom filters, partition index, summary, and key/row cache play in the read path?
What are digest read requests, and how does the coordinator use them during a read?
Deletes Tombstones & Repair
What is the purpose of nodetool repair, and why is it important to run it regularly?
What is the difference between full and incremental repair?
Why does reading past accumulated tombstones cause performance problems?
Explain the concept of Tombstones in Cassandra. Why are deletes essentially writes, and how do tombstones impact read performance and disk space?
What is anti-entropy Repair in Cassandra, and how do Merkle trees and the nodetool repair process work?
What is gc_grace_seconds, and why is it critical to run repairs within this period, especially concerning tombstones?
Explain delete semantics in Cassandra — why deletes are writes, tombstone accumulation, and gc_grace_seconds.
How does tombstone-aware compaction help reclaim space, and what is a single-SSTable tombstone compaction?
What is subrange repair, and why might you use a tool like Cassandra Reaper to schedule repairs?
What are the tombstone_warn_threshold and tombstone_failure_threshold, and how do they protect the cluster?
Compaction & Compression
How does compression work in Cassandra, and what are the trade-offs of enabling it on tables?
What is Compaction in Cassandra? Explain the different compaction strategies and when to choose each.
Explain the Unified Compaction Strategy in Cassandra 5.0 and discuss its benefits and tradeoffs.
Discuss the strategies for handling data compaction conflicts in Cassandra, including tombstone-aware strategies.
Cluster Operations & Scaling
How do you scale a Cassandra cluster?
How do backups and restores work in Cassandra with snapshots and incremental backups?
What is the purpose of nodetool cleanup, and when should you run it?
How do you add, remove, or replace nodes in a Cassandra cluster and what happens during bootstrapping/streaming?
What is the difference between decommissioning a node and using removenode?
Performance Tuning & Monitoring
What are some common performance tuning techniques for Cassandra?
What are the key metrics you monitor in a Cassandra cluster?
What are the recommended limits on partition size in Cassandra, and what happens if you exceed them?
Explain token-aware and datacenter-aware load balancing policies in Cassandra client drivers. Why are they important?
How would you troubleshoot slow queries in Cassandra?
How can you optimize Cassandra for write-heavy workloads?
What are retry and speculative-execution policies in Cassandra clients?
What is the difference between key cache and row cache, and why can the row cache be dangerous?
How does speculative execution improve tail latency in Cassandra reads?
Security & Governance
How do Guardrails in Cassandra help avoid configuration and usage pitfalls?
How does authentication and authorization work in Cassandra, and what are roles?
Explain the CIDR Authorizer feature in Cassandra 5.0 and how it enhances security.
What options does Cassandra provide for encryption in transit and at rest?
What is Change Data Capture (CDC) in Cassandra, and what is it used for?
Write Path & Data Integrity
What is the purpose of the Commit Log?
Explain lightweight transactions (compare-and-set via Paxos) and the SERIAL consistency level in Cassandra.
Explain the difference between logged and unlogged batches in Cassandra. When should you use a batch, and when can it hurt performance?
Why does SSTable corruption happen in Cassandra, and what is Cassandra's default disk failure policy when corruption is detected?
Describe the process of recovering a Cassandra node that has encountered corrupted SSTables.