Cassandra

0%
Theory
Quiz

    Introduction & Fundamentals

    • What is a node in Cassandra?

      Junior
    • What is Apache Cassandra and what problem does it solve?

      Junior
    • What is nodetool and what are its key capabilities for managing and monitoring Cassandra nodes?

      Junior
    • What is Apache Cassandra, and what are its core design principles?

      Junior
    • Can you explain why Cassandra is called a NoSQL database?

      Junior
    • What is the role of the CQL (Cassandra Query Language) in Cassandra?

      Junior
    • What is Cassandra and when should you use it?

      Junior
    • Why was Apache Cassandra developed?

      Junior
    • What is CQLSH and why is it used?

      Junior
    • What are the origins of Cassandra and how did Dynamo and Bigtable influence its design?

      Mid

    Nosql Comparisons & Cap Theorem

    • How does Cassandra differ from traditional relational databases?

      Junior
    • How does CQL resemble and differ from SQL?

      Junior
    • Explain the concept of eventual consistency in Cassandra.

      Mid
    • Explain the CAP theorem and where Cassandra typically fits (AP with tunable consistency).

      Mid
    • How does Cassandra differ from MongoDB?

      Mid
    • Describe the tradeoffs between eventual consistency and strong consistency in Cassandra.

      Mid
    • How does Cassandra compare with HBase in terms of architecture and data model?

      Mid
    • How do modern databases like Cassandra address the challenges posed by the CAP theorem?

      Senior
    • How does Cassandra compare to a relational database or other NoSQL databases (MongoDB, HBase, DynamoDB) in terms of data model, consistency, and use cases?

      Senior
    • Compare Apache Cassandra with Amazon DynamoDB in terms of architecture, data model, consistency models, scalability strategies, use cases, and pros and cons.

      Senior
    • How does Cassandra relate to ScyllaDB and what makes ScyllaDB Cassandra-compatible?

      Senior

    Use Cases & Trade Offs

    • Where does Cassandra fit, and what are its ideal use cases?

      Junior
    • What are the advantages and disadvantages of using Cassandra?

      Junior
    • When would you not use Cassandra?

      Mid
    • 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?

      Mid
    • What are Cassandra's ideal use cases and when should you NOT use Cassandra?

      Mid
    • When would you choose Cassandra over a traditional relational database, and what are the key trade-offs?

      Mid
    • 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?

      Senior

    Cluster Architecture & Topology

    • What is a coordinator node and what does it do in a request?

      Junior
    • Explain the concept of a Cassandra cluster, nodes, and datacenters.

      Junior
    • What is a data center in Cassandra?

      Junior
    • What are seed nodes in Cassandra and what role do they play?

      Junior
    • How does Cassandra achieve high availability and no single point of failure?

      Mid
    • How does the ring architecture work in Cassandra?

      Mid
    • How does Cassandra use datacenters and racks in its topology?

      Mid
    • Explain the masterless, peer-to-peer architecture of Cassandra. Why is it designed this way?

      Senior
    • What is the primary consideration when determining the optimal number of nodes in a Cassandra cluster?

      Senior

    Data Modeling

    • Explain Cassandra's data model: Keyspaces, Tables (Column Families), Rows, Partition Keys, and Clustering Columns.

      Junior
    • What is the significance of the Primary Key in Cassandra, and how is it composed?

      Junior
    • Why does Cassandra not support JOINs or referential integrity, and what are the implications for data modeling?

      Mid
    • Explain the concept of query-driven data modeling in Cassandra. Why is it crucial, and how does it differ from relational modeling?

      Mid
    • Differentiate between a Partition Key and Clustering Columns. How do they influence data storage and retrieval?

      Mid
    • Explain the concept of data denormalization in Cassandra.

      Mid
    • Explain the concept of Primary Keys in Cassandra and why Cassandra does not support Foreign Keys or referential integrity.

      Mid
    • What are the challenges in Cassandra data modeling?

      Mid
    • Explain how Cassandra handles schema changes and what are the best practices.

      Mid
    • How does Cassandra's wide-column store architecture make it suitable for time-series data?

      Mid
    • What are wide partitions or wide rows in Cassandra? What problems are associated with them, and how can they be mitigated?

      Senior
    • How would you design a data model in Cassandra for a specific use case, considering query patterns and data relationships?

      Senior
    • How would you model time-series data effectively in Cassandra?

      Senior

    Keyspaces Tables & Keys

    • What is a keyspace in Cassandra and what does it define (replication strategy, replication factor, durable writes)?

      Junior
    • What is a table (column family) in Cassandra?

      Junior
    • What is a partition key in Cassandra and why is it important?

      Junior
    • What is a clustering key in Cassandra and what is its role?

      Junior
    • What is a composite/compound partition key and when would you use one?

      Mid
    • Why are all writes in Cassandra considered upserts, and what does that mean for INSERT versus UPDATE?

      Mid
    • What is a cell in Cassandra, and how do cell-level timestamps work?

      Mid
    • How do you control the on-disk sort order of rows within a partition using CLUSTERING ORDER BY?

      Mid
    • Why is clock synchronization (NTP) important in a Cassandra cluster, and what can go wrong if clocks drift?

      Senior
    • What is the durable_writes keyspace option, and what is the effect of disabling it?

      Senior

    Cql Types & Features

    • What is the purpose of TTL (Time to Live) in Cassandra?

      Junior
    • What collection types and UDTs does Cassandra support?

      Junior
    • What data types does CQL support, and are there any Cassandra-specific types you should know?

      Junior
    • What is a Static Column, and what is its primary use case?

      Mid
    • What are the different types of counters in Cassandra, and when would you use each type?

      Mid
    • What is a TimeUUID in Cassandra, and when would you use it instead of a regular UUID?

      Mid
    • What are frozen versus non-frozen collections in Cassandra, and when do you use each?

      Mid
    • Why are counters treated specially in Cassandra, and what limitations do they have?

      Mid
    • Explain the purpose and usage of User-Defined Functions (UDFs) and User-Defined Aggregates (UDAs) in Cassandra.

      Senior
    • What are virtual tables in Cassandra, and what kind of information do they expose?

      Senior

    Indexing & Querying

    • What is indexing in Cassandra?

      Junior
    • What are Materialized Views in Cassandra, and how do they work?

      Mid
    • What is ALLOW FILTERING in CQL, and why is its use generally discouraged in production?

      Mid
    • What are Prepared Statements in CQL, and what benefits do they offer?

      Mid
    • How do you handle transactions in Cassandra?

      Mid
    • When is it appropriate to use an index in Cassandra, and when should it be avoided?

      Mid
    • How does paging work in Cassandra, and why is it important for large result sets?

      Mid
    • Explain the purpose and limitations of Secondary Indexes in Cassandra. When would you use them, and what are the alternatives?

      Senior
    • What are Storage-Attached Indexes (SAI) in Cassandra, and how do they improve on older secondary indexes?

      Senior

    Consistency Levels

    • What is a consistency level in Cassandra? Give an example.

      Junior
    • What is tunable consistency in Cassandra, and why is it a key feature?

      Mid
    • What are the different consistency levels in Cassandra, with examples like ONE, QUORUM, LOCAL_QUORUM, ALL, and SERIAL?

      Mid
    • Explain the benefits and trade-offs of using tunable consistency levels in Cassandra.

      Mid
    • What is tunable consistency in Cassandra and what consistency levels are available?

      Mid
    • How does Cassandra resolve conflicts between concurrent writes, and what is the last-write-wins model?

      Mid
    • What happens when a query's requested consistency level cannot be satisfied, and what is an UnavailableException?

      Mid
    • What is the difference between ONE and LOCAL_ONE consistency levels?

      Mid
    • How does Cassandra handle data consistency in a multi-datacenter environment, particularly with LOCAL_QUORUM and EACH_QUORUM?

      Senior
    • How does the R + W > N rule provide strong consistency in Cassandra?

      Senior
    • How does Cassandra handle consistency when data is written to multiple nodes, and what trade-offs are involved?

      Senior
    • How does the consistency level ANY relate to hinted handoff, and what are its risks?

      Senior
    • What is the difference between SERIAL and LOCAL_SERIAL consistency in lightweight transactions?

      Senior

    Replication & Distribution

    • What is the Replication Factor, and how does it relate to data availability and durability?

      Junior
    • What is data replication in Cassandra and why is it important?

      Junior
    • How does data get distributed across nodes in a Cassandra cluster, and what role do partitioners and token ranges play?

      Mid
    • Explain the difference between SimpleStrategy and NetworkTopologyStrategy replication strategies. When would you use each?

      Mid
    • What are Virtual Nodes (vnodes), and what benefits do they provide?

      Mid
    • How does Cassandra ensure data availability and fault tolerance?

      Mid
    • How does Cassandra handle node failures?

      Mid
    • How does multi-datacenter replication work and why use LOCAL_QUORUM?

      Mid
    • How does consistent hashing map data to nodes in Cassandra?

      Mid
    • How does Cassandra ensure data durability and fault tolerance through replication?

      Mid
    • What are partitions and tokens in Cassandra?

      Mid
    • What are the different types of partitioners in Cassandra?

      Mid
    • What is a partitioner in Cassandra and what does Murmur3Partitioner do?

      Mid
    • How are replicas chosen around the ring in Cassandra?

      Mid
    • How do multi-datacenter operations and disaster recovery work in Cassandra?

      Senior

    Gossip Failure Detection & Snitches

    • What states can a node show in nodetool status (e.g. UN, DN, UJ), and what do they mean?

      Junior
    • What is a snitch and what are the different types of snitches?

      Mid
    • Explain the Gossip protocol in Cassandra. What is its role, and how does it help with failure detection?

      Senior
    • How does failure detection work in Cassandra and what is the phi accrual failure detector?

      Senior

    Storage Engine Read & Write Paths

    • What is the difference between a memtable and an SSTable?

      Junior
    • Explain the Cassandra write path involving the Commit Log, Memtable, and SSTables.

      Mid
    • What are SSTables, what are their characteristics, and what components do they typically include?

      Mid
    • How do Bloom Filters work in Cassandra, and what problem do they solve for reads?

      Mid
    • What is a Memtable, and what happens when it's full?

      Mid
    • How does Cassandra use SSTables and what is their role in the data lifecycle?

      Mid
    • What happens when a Cassandra node restarts, and how does commit log replay ensure durability?

      Mid
    • What is Hinted Handoff, and how does it contribute to write availability during temporary node failures?

      Senior
    • Explain the Cassandra read path, detailing how data is retrieved from Memtables and SSTables.

      Senior
    • Explain Read Repair (blocking and background). How does it help maintain data consistency?

      Senior
    • How does Cassandra's LSM-tree storage engine work?

      Senior
    • What are Read Amplification and Write Amplification in the context of Cassandra's storage engine?

      Senior
    • What role do bloom filters, partition index, summary, and key/row cache play in the read path?

      Senior
    • What are digest read requests, and how does the coordinator use them during a read?

      Senior

    Deletes Tombstones & Repair

    • What is the purpose of nodetool repair, and why is it important to run it regularly?

      Mid
    • What is the difference between full and incremental repair?

      Mid
    • Why does reading past accumulated tombstones cause performance problems?

      Mid
    • Explain the concept of Tombstones in Cassandra. Why are deletes essentially writes, and how do tombstones impact read performance and disk space?

      Senior
    • What is anti-entropy Repair in Cassandra, and how do Merkle trees and the nodetool repair process work?

      Senior
    • What is gc_grace_seconds, and why is it critical to run repairs within this period, especially concerning tombstones?

      Senior
    • Explain delete semantics in Cassandra — why deletes are writes, tombstone accumulation, and gc_grace_seconds.

      Senior
    • How does tombstone-aware compaction help reclaim space, and what is a single-SSTable tombstone compaction?

      Senior
    • What is subrange repair, and why might you use a tool like Cassandra Reaper to schedule repairs?

      Senior
    • What are the tombstone_warn_threshold and tombstone_failure_threshold, and how do they protect the cluster?

      Senior

    Compaction & Compression

    • How does compression work in Cassandra, and what are the trade-offs of enabling it on tables?

      Mid
    • What is Compaction in Cassandra? Explain the different compaction strategies and when to choose each.

      Senior
    • Explain the Unified Compaction Strategy in Cassandra 5.0 and discuss its benefits and tradeoffs.

      Senior
    • Discuss the strategies for handling data compaction conflicts in Cassandra, including tombstone-aware strategies.

      Senior

    Cluster Operations & Scaling

    • How do you scale a Cassandra cluster?

      Mid
    • How do backups and restores work in Cassandra with snapshots and incremental backups?

      Mid
    • What is the purpose of nodetool cleanup, and when should you run it?

      Mid
    • How do you add, remove, or replace nodes in a Cassandra cluster and what happens during bootstrapping/streaming?

      Senior
    • What is the difference between decommissioning a node and using removenode?

      Senior

    Performance Tuning & Monitoring

    • What are some common performance tuning techniques for Cassandra?

      Mid
    • What are the key metrics you monitor in a Cassandra cluster?

      Mid
    • What are the recommended limits on partition size in Cassandra, and what happens if you exceed them?

      Mid
    • Explain token-aware and datacenter-aware load balancing policies in Cassandra client drivers. Why are they important?

      Senior
    • How would you troubleshoot slow queries in Cassandra?

      Senior
    • How can you optimize Cassandra for write-heavy workloads?

      Senior
    • What are retry and speculative-execution policies in Cassandra clients?

      Senior
    • What is the difference between key cache and row cache, and why can the row cache be dangerous?

      Senior
    • How does speculative execution improve tail latency in Cassandra reads?

      Senior

    Security & Governance

    • How do Guardrails in Cassandra help avoid configuration and usage pitfalls?

      Mid
    • How does authentication and authorization work in Cassandra, and what are roles?

      Mid
    • Explain the CIDR Authorizer feature in Cassandra 5.0 and how it enhances security.

      Senior
    • What options does Cassandra provide for encryption in transit and at rest?

      Senior
    • What is Change Data Capture (CDC) in Cassandra, and what is it used for?

      Senior

    Write Path & Data Integrity

    • What is the purpose of the Commit Log?

      Junior
    • Explain lightweight transactions (compare-and-set via Paxos) and the SERIAL consistency level in Cassandra.

      Senior
    • Explain the difference between logged and unlogged batches in Cassandra. When should you use a batch, and when can it hurt performance?

      Senior
    • Why does SSTable corruption happen in Cassandra, and what is Cassandra's default disk failure policy when corruption is detected?

      Senior
    • Describe the process of recovering a Cassandra node that has encountered corrupted SSTables.

      Senior