Apache Cassandra Developer Associate study materials
Apache Cassandra Developer Associate study resources

Apache Cassandra Developer Associate flashcards

Apache Cassandra Developer Associate · Build recall with a focused review session.

32 cards. Read the term and the definition here. The deck at the top of this page is optional.

Murmur3Partitioner
Default partitioner in Cassandra that hashes partition keys to a 64-bit token in the range -2^63 to 2^63-1, distributing data uniformly across the ring.
Replication Factor
The number of copies of each partition stored in a cluster. Set per keyspace; higher RF increases durability and read availability but also storage and write cost.
Consistency Level QUORUM
Requires a majority of replicas (RF/2 + 1) to respond. With RF=3, QUORUM is 2. Combining write QUORUM and read QUORUM ensures strong consistency.
Hinted Handoff
Mechanism where a coordinator stores writes for an unavailable replica and replays them when the replica recovers. Default hint window is 3 hours.
Merkle Tree Repair
Anti-entropy repair compares Merkle trees of token ranges across replicas to identify and reconcile differences. Run nodetool repair regularly within gc_grace_seconds.
Gossip Protocol
Cassandra's peer-to-peer protocol for disseminating node state (up/down, load, schema) every second. Uses phi accrual failure detector to mark nodes down.
Snitch
Component that determines network topology (racks, data centers) for replica placement. Examples: SimpleSnitch, GossipingPropertyFileSnitch, Ec2Snitch.
Commit Log
Durable, append-only log on disk that ensures write durability. Writes go to commit log and memtable; commit log is flushed and segments are removed after memtable flush.
Partition Key
The first column(s) of the primary key that determine data distribution via hashing. Must be included in WHERE clauses for efficient queries.
Clustering Columns
Columns after the partition key in the primary key that define the sort order within a partition and enable range queries on those columns.
Denormalization
Design approach where data is duplicated into multiple tables to optimize query performance, avoiding joins. Each query maps to one table.
Wide Partition
A partition with many rows (e.g., >100k) or large size (>100MB), which can cause performance issues. Use bucketing (e.g., time-based) to split.
Frozen Collection
A collection type that is serialized as a single value, making it immutable. Required for use in primary keys or as elements of other collections.
Counter Column
A special column type for distributed counters. Counter tables cannot mix counter and non-counter columns, and counters cannot be used in primary keys.
Secondary Index
An index on a non-primary-key column for query flexibility. Best for low-cardinality columns; can cause scatter-gather across nodes and should be used sparingly.
TTL
Time-to-live in seconds after which data expires and is deleted. Can be set per column or table. Expired data becomes tombstones until compaction.
CQL INSERT Upsert
In CQL, INSERT is an upsert: it inserts a new row or updates an existing row with the same primary key. There is no separate upsert statement.
Lightweight Transaction
A conditional update using IF clauses (e.g., IF NOT EXISTS) that provides linearizable consistency via Paxos. Expensive; use sparingly.
BATCH Statement
Groups multiple mutations for atomicity and performance. LOGGED BATCH ensures atomicity across partitions; UNLOGGED BATCH is for single partition and improves performance.
ALLOW FILTERING
CQL clause that permits queries without a partition key, causing a full scan. Expensive and should be avoided; redesign schema instead.
User-Defined Type
A custom type with named fields. Must be frozen to be used in primary keys or as collection elements. Created with CREATE TYPE.
CQL Aggregation
Functions like COUNT, SUM, AVG, MIN, MAX that aggregate results. COUNT(*) is expensive on large tables as it scans all partitions.
Prepared Statement
A query precompiled and cached on the server, improving performance for repeated executions. Drivers use prepared statements to reduce parsing overhead.
Token-Aware Routing
Driver feature that routes requests directly to a replica holding the data, reducing network hops and latency. Requires driver to be aware of cluster topology.
Speculative Execution
Driver sends requests to multiple replicas if the first is slow, reducing tail latency. Configure carefully to avoid overloading the cluster.
Idempotent Statement
A statement that can be safely retried without changing the result (e.g., INSERT, UPDATE with fixed values). Mark as idempotent to allow driver retries.
Connection Pooling
Driver maintains a pool of connections to each node. Tune pool size based on throughput; default is often 1 connection per node per pool.
Paging
Fetching large result sets in chunks. Drivers automatically page; set fetch size appropriately to balance memory and round trips.
Compaction Strategy
Algorithm for merging SSTables. STCS for write-heavy, LCS for read-heavy, TWCS for time-series. Choose based on workload.
Bloom Filter
Probabilistic data structure that reduces disk reads by quickly checking if a partition exists in an SSTable. Tune bloom_filter_fp_chance (default 0.01).
Key Cache
Cache that stores partition key locations to avoid disk seeks. Enabled by default; helps read performance. Tune size based on memory.
nodetool repair
Command that runs anti-entropy repair using Merkle trees to reconcile data across replicas. Must run within gc_grace_seconds to avoid tombstone resurrection.