Question-: You have consistency level set as ONE. Would always have a read repair operation as blocking? A. True B. False
Answer: B Exp: Lets keep in mind that Foreground(blocking) repair only done when consistency level is set as ONE/LOCAL_ONE. Because in case of CL=ONE/LOCAL_ONE it would fetch only one replica during the read operation. And there is no way to compare the replica with other copy because of CL=1, only once copy would be read. Hence, there would not be even read repair with the consistency level.
In other cases where RF=3 and CL <> ONE/LOCAL_ONE more than one replica would be read and compared with each other. If there is any copy of the data is not correct that would be repaired.
There are parameters (read_repair_chance and dc_local_read_repair_chance) by which read repairs are governed. Both are background repairs. These parameters see the probability which Cassandra will perform a read repair with a consistency level less than ALL.
Admin Only
Question-: You see that your Cassandra database is occasionally not in Sync and you decided to enable the NodeSync utility. What all are correct for this utility? A. You have to schedule the NodeSync activity which can periodically e.g. every 4 hours. B. It has a high impact on the Cluster performance. C. This does not require manual intervention. D. Each node should run the NodeSync service. E. NodeSync is enabled for per table basis and it validates the local data ranges for NodeSync-enabled tables and repairs any inconsistency found. Ans; C,D,E Exp: NodeSync is an utility service to repair the data in Cassandra database. This service runs in the background. This has low overhead and provides consistent performance and minimal manual effort required like just enabling it. It has following features - Continuously validates that data is in sync on all replica. - Always running but low impact on cluster performance. - Fully automatic, no manual intervention needed. - Completely replace anti-entropy repairs. Each node runs the NodeSync service, and remain idle if there is nothing to validate. It needs to be enabled on per table basis, which continuously validates the local data ranges for the tables on which this is enabled.
Remember: when NodeSync is enabled on the table, then running repair command on that particular table will be rejected.
Admin only
Question-: Which of the following statement is/are correct? A. Vnode helps in determining partition range and rebalancing the cluster when adding or removing nodes. B. You must have same token architecture across the entire cluster. Means all the nodes should be vnodes enabled or single-token architecture. C. You can have one of the Datacenter as transaction only in same cluster. D. When adding more than once nodes to the cluster using allocation algorithm they should not be added altogether and should be done one by one.
Answer: A,C,D
Explanation: vnodes are good and helps in various tasks such as eliminating the need to determine the partition range (by calculating and assigning tokens). Rebalancing the cluster when adding or removing nodes, and replacing dead nodes. In Cassandra you should use the same token architecture in a datacenter (not required for entire cluster). For example the nodes should be all vnode-enabled or single-token architecture. Across the datacenter you can have different architecture like A transaction only datacenter, a datacenter with the single token architecture and other datacenter with the vnode enabled tokens. It is recommended that you use the 8 vniodes. So load can be distributed across the nodes and would have minimum impact on performance.
While adding multiple nodes to the cluster using the allocation algorithm, we should ensure that nodes are added one at a time and should not be added concurrently, because algorithm can assigns same tokens to different nodes.
Admin only
Question-: You have a Cassandra cluster enabled with the vnodes. How can you disable the same? A. We need to comment the num_tokens in cassandra.yaml file B. We need to comment the allocate_tokens_for_loal_replication_factor in cassandra.yaml file C. Uncomment the initial_token and set it to 1. D. Comment the initial_token E. Uncomment num_tokens and set it with the 8
Answer: A, B, C Exp: You can enable or disable the vnodes in the Cassandra cluster. For that you have to follow the below process.
Enabling vnodes: - Set the num_tokens in Cassandra.yaml file - You should use the allocation algorithm “allocate_tokens_for_local_replication_factor� and set it to the target replication factor for the keyspace in a datacenter. - Don’t set the initial-token. Disabling nodes: Similarly, we have to follow the below settings in Cassandra.yaml file for disabling the vnodes. - Comment the num_tokens and allocate_tokens_for_local_replication_factor setting - And uncomment the intial_token and set it to 1.