Enhance your understanding of handling node failures and managing repair processes in Cassandra clusters with this focused quiz. Evaluate your grasp on replication, consistency, anti-entropy repair, hinted handoff, and essential best practices in maintaining resilient, high-availability data systems.
In a Cassandra cluster, what typically happens when a single node becomes unreachable due to a hardware failure?
Explanation: Cassandra is designed with high availability in mind, so when one node fails, requests are routed to other replicas that hold copies of the data. The entire cluster does not shut down, so option two is incorrect. All data does not become inaccessible; only the downed node is affected. Data is not permanently lost because replicas exist elsewhere in the cluster.
What is the main purpose of performing a repair operation in a Cassandra cluster?
Explanation: Repair operations in Cassandra are critical for synchronizing data between replicas, helping maintain consistency especially after failures or network partitions. Resetting nodes to their original state is not the purpose of repair. Clearing all user data is unrelated, and shutting down nodes is not part of the repair process.
If a write is attempted on a node that is currently down, which method does Cassandra use to temporarily store this information?
Explanation: Hinted handoff is the technique used to store hints about missed writes so they can be delivered once the node is back online. Snapshot restore is for backup and recovery, not write availability. Node caching is unrelated to storing pending writes, and immediate deletion does not help in reapplying missed writes.
Which repair method in Cassandra compares data between replicas and fixes any differences found?
Explanation: Anti-entropy repair specifically refers to comparing and reconciling data between replicas to fix inconsistencies. Lazy write is not a repair process but relates to write-back caching. Row cache refresh deals with caching and is unrelated to repairs. Partition bounce is not a valid repair method.
How does running a repair operation help improve data consistency after a node comes back online?
Explanation: Repairs ensure that any missed updates or inconsistencies between replicas due to node downtime are reconciled. Repairs do not alter the replication factor, which must be manually reconfigured. Deleting new data would be harmful and is not part of the process, and repair does not block all writes.
If a write request is sent using consistency level QUORUM and one node is down, what will happen in a cluster with three replicas?
Explanation: QUORUM requires a majority of replicas to acknowledge the write; in a three-replica setup, two acknowledgments suffice for success. The operation does not fail instantly if two nodes are available. Not all nodes must be up, as QUORUM does not require all replicas. Consistency levels are not ignored during failures.
What is the main difference between a full repair and an incremental repair in Cassandra?
Explanation: A full repair examines every piece of data, whereas incremental repair processes only segments changed since the previous repair, improving efficiency. Incremental repair does not inherently run faster due to more nodes. Full repairs don't delete old data, and incremental repairs do not affect the replication factor.
Which situation best describes an appropriate time to run a repair operation in Cassandra?
Explanation: Running a repair is important after a node returns to the cluster to ensure it is consistent with the rest. Performing repairs during every write or read is not practical or necessary. Repairs cannot be run before the database software is installed.
Why is it recommended to schedule regular repair operations in Cassandra clusters?
Explanation: Regular repairs ensure inconsistencies do not build up between replicas, maintaining healthy data integrity. Repairs do not erase duplicate data but synchronize correct values. They do not reduce the node count or intentionally increase disk usage.
After a previously unavailable node rejoins the cluster, what happens to the hints stored for it by other nodes?
Explanation: When a node returns, hints are sent to it so it can replay and apply any writes missed while offline. Deleting hints immediately would result in data loss. The node does not ignore the hints, as they are essential for consistency. Hints do not disable repairs, but complement them for data health.