Cassandra Glossary
## A
### Anti-Entropy Repair
A maintenance process in Cassandra that compares data across replicas to identify and fix inconsistencies. It uses **Merkle Trees** to efficiently detect differences without transferring all data. Essential for maintaining data consistency over time.
### Availability
The guarantee that every request receives a response, even if some nodes are down. In the CAP theorem, Cassandra prioritizes Availability (AP system) and Partition Tolerance over strong Consistency (though consistency is tunable).
## B
### Bloom Filter
A probabilistic data structure used to test whether an element is a member of a set. Cassandra uses Bloom filters to quickly determine if an SSTable might contain a specific partition key, reducing unnecessary disk I/O.
### Bootstrap
The process of a new node joining the cluster. During bootstrap, the node contacts seed nodes to learn the topology, announces its token range, and streams data from existing nodes that are currently holding its data.
## C
### CAP Theorem
A theorem stating that a distributed system can only provide two of the following three guarantees: **Consistency**, **Availability**, and **Partition Tolerance**. Cassandra is typically classified as an **AP** system (Availability + Partition Tolerance) with tunable consistency.
### Clustering Key
The component of the Primary Key that determines the sort order of data within a partition. It allows for efficient range queries and organizing related data together on disk.
### Commit Log
An append-only log where all write operations are recorded immediately for durability. If a node crashes, the Commit Log is replayed to restore memtables.
### Compaction
The process of merging multiple SSTables into a new, larger SSTable. It removes deleted data (tombstones) and older versions of data, reclaiming disk space and improving read performance.
### Composite Key
A Partition Key or Clustering Key that consists of multiple columns. For example, `PRIMARY KEY ((region, country), year)` has a composite partition key `(region, country)`.
### Consistency Level (CL)
A setting that defines how many replicas must acknowledge a read or write operation before it is considered successful. Common levels include `ONE`, `QUORUM`, `ALL`, and `LOCAL_QUORUM`.
### Coordinator Node
The node that receives a client request. It acts as a proxy, forwarding the request to the appropriate replicas (based on the partition key) and returning the response to the client. Any node in the cluster can act as a coordinator.
## D
### Datacenter
A logical grouping of nodes, often corresponding to a physical location or availability zone. Cassandra supports multi-datacenter replication for disaster recovery and lower latency.
### Decommission
The process of gracefully removing a node from the cluster using `nodetool decommission`. The node streams its data to other nodes in the ring before shutting down, ensuring no data is lost.
## G
### Gossip Protocol
A peer-to-peer communication protocol used by Cassandra nodes to exchange state information (e.g., node status, load, schema versions). It ensures all nodes have a consistent view of the cluster topology.
## H
### Hard Link
A filesystem feature where a file entry points to the same underlying data blocks (inode) as another file. Cassandra uses hard links for **Snapshots**, allowing backups to be taken instantly without duplicating data on disk.
### Hinted Handoff
A mechanism where the coordinator temporarily stores a write intended for a down replica. When the replica comes back online, the coordinator "hands off" the hint, replaying the write to ensure data consistency.
## I
### Idempotency
The property of an operation where applying it multiple times has the same effect as applying it once. Cassandra writes are generally idempotent (last write wins based on timestamp).
### Incremental Backup
A backup strategy that copies only the SSTables created (flushed) since the last snapshot. It requires `incremental_backups: true` in `cassandra.yaml` and relies on hard links.
## J
### JMX (Java Management Extensions)
A Java technology that supplies tools for managing and monitoring applications. Cassandra exposes metrics and operations (via `nodetool`) through JMX.
## K
### Keyspace
The top-level container for data in Cassandra, analogous to a database in RDBMS. It defines the replication strategy, replication factor, and datacenter awareness.
## L
### Last Write Wins (LWW)
The conflict resolution strategy used by Cassandra. If multiple versions of the same data exist, the one with the latest client-provided timestamp is considered the correct version.
## M
### Memtable
An in-memory structure where data is written first (after the Commit Log). When a memtable fills up, it is flushed to disk as an SSTable.
### Merkle Tree
A hash tree where leaves are hashes of data blocks. Cassandra uses Merkle Trees during anti-entropy repair to efficiently compare data between replicas and minimize the amount of data transferred.
## N
### Nodetool
The command-line utility for managing a Cassandra cluster. It provides commands for monitoring, repair, cleanup, and other operational tasks.
## P
### Partition Key
The part of the primary key that determines which node(s) store the data. Consistent hashing is used to map partition keys to tokens and nodes.
### Partition Tolerance
The ability of a system to continue operating despite network partitions (communication failures) between nodes. Cassandra is designed for high partition tolerance.
### Phi Accrual Failure Detector
A mathematical model used by Cassandra to detect failed nodes. Instead of using a fixed timeout, it calculates the suspicion level (φ) based on the history of heartbeat arrival times, adapting to network conditions.
## Q
### Quorum
A consistency level requiring a majority of replicas (N/2 + 1) to acknowledge an operation. Using `QUORUM` for both reads and writes ensures strong consistency (`R + W > N`).
## R
### RBAC (Role-Based Access Control)
A security mechanism where permissions (like SELECT, MODIFY, ALTER) are assigned to Roles rather than directly to users. Users are then granted Roles.
### Read Repair
A mechanism where the coordinator checks for inconsistencies during a read operation. If replicas return different data, the coordinator repairs the outdated replicas with the latest version in the background (or foreground for blocking read repair).
### Repair
See **Anti-Entropy Repair**.
### Replication Factor (RF)
The number of copies of data stored in the cluster. An RF of 3 is common standard for production environments.
## S
### Snapshot
A point-in-time backup of data. In Cassandra, taking a snapshot flushes Memtables to disk and creates hard links to all existing SSTables, ensuring the backup is consistent and space-efficient.
### Seed Node
A node configured in `cassandra.yaml` that serves as an initial contact point for new nodes joining the cluster. Seed nodes help facilitate gossip convergence and prevent cluster partitioning.
### Snitch
A component that determines the topology of the network (which rack and datacenter a node belongs to). This information is used for efficient routing and replication.
### SSTable (Sorted String Table)
The immutable data file format used by Cassandra to persist data on disk. SSTables are created when Memtables are flushed.
### SSTableloader
A utility for bulk loading data into a cluster. It streams SSTables directly to the appropriate nodes based on the cluster topology.
### Static Column
A column that is shared by all rows within the same partition. It is stored only once per partition, regardless of how many clustering rows exist.
## T
### Time-To-Live (TTL)
An expiration time (in seconds) that can be set on a column or row. After the TTL expires, the data is automatically marked with a tombstone and eventually deleted during compaction.
### Tombstone
A marker used to indicate that data has been deleted. Since SSTables are immutable, data isn't immediately removed; instead, a tombstone is written to suppress the data during reads until compaction occurs.
### Tunable Consistency
The ability to configure the consistency guarantee for each individual read or write operation, allowing developers to balance latency, availability, and consistency.
## W
### Wide Partition
A partition that has grown too large (e.g., > 100MB or > 100k rows) because of a poor data model. Wide partitions cause heap pressure and performance issues.
### Write Amplification
The phenomenon where one write operation results in multiple physical disk writes (e.g., Commit Log + SSTable + Compaction).