Question-: Which of the following statements are correct with regards to Isolation in Cassandra database? A. A write to a row within a single partition on a single node is only visible to the client performing the operation. B. A write to a row within a single partition on a single node is visible to all the client connecting to the database. C. All updates in a batch operation belonging to a given partition key on a single node is only visible to the client performing the operation. D. All updates in a batch operation belonging to a given partitions keys on a multiple node is not isolated.
Answer: A, C,D
Explanation: In Cassandra DB write and delete operations are performed with full row-level isolation. When writing to a row within the same and single partition is only visible to the client who is doing this operation until it is completed. All updates in a batch operation belonging to a given partition key have the same restriction. However, if you are doing batch operation which includes the changes for more than one partition then it would not be considered as an isolated operation.
Admin and Dev both
Question-: Which of the following is a valid statement with regards to Gossip protocol, in Cassandra database setup? A. You should setup every node as a seed node for better performance in the cluster and each node well aware about each other in ring. B. You should use the same list of seed nodes for each node in the cluster. C. Seed node is only single point of failure in the Cassandra cluster setup. Hence, you should have more than one node setup as a seed node. D. To permanently change a node’s membership in a cluster, you must explicitly add or remove nodes from the cluster.
Answer: B, D Exp: You should use the same list of seed nodes for all the nodes in the cluster. Setting the same seed nodes on all nodes is important when first time node startups. By default, a node remembers other nodes is has gossiped with between subsequent restarts. The seed node designation has no purpose other than bootstrapping the gossip process for new nodes joining the cluster. However, please note that seed nodes are not a single point of failure.
It is possible that node can fail anytime in the cluster or it can be transient state from which node is not reachable for network issue. And there could be many more reason by which a node is not reachable in the cluster. Node outage may not be permanent from the cluster; hence node will not be automatically removed from the cluster. Other nodes in the cluster periodically try to re-establish contact with the failed nodes to see if they are backup or not. However, if we want to permanently change a node’s membership in a cluster, we must explicitly add or remove this node from the cluster.
When node comes back online after an outage, it may have missed writes for the replica data it maintains. Repair mechanisms exists to recover missed data, such as hinted handoffs and manual repair with nodetool repair. Hence, the length of the outage determines which repair mechanism is used to make the data consistent.
Admin and Dev both
Question-: What all the benefits of the defining v-nodes or converting a physical node into multiple v-nodes in the Cassandra Cluster? A. With v-nodes tokens are automatically calculated for each v-node and assigned accordingly. B. While adding and removing nodes cluster automatedly balance the cluster and load would be evenly distributed across the nodes. C. When new node is added in the cluster can be build faster, because every node share the load of building this new node. D. The proportion of vnodes assigned to each machine in a cluster can be assigned, so smaller and larger nodes can be used in the cluster.
Answer: A,B,C,D Exp: Virtual nodes are the nodes created using the same physical node. Let’s assume in your Cassandra cluster there are 3 physical nodes. You can divide each physical node as 4 virtual nodes. Hence, there are in total in cluster total 12 virtual nodes. And token can be divided among these 12 nodes, instead of 3 nodes. And also, token may not be continuous across all vnodes of a single node. Hence, data or load can be distributed across 12 vnodes. Which helps in balancing the cluster when a node leave or join the cluster. Hence, all the options given in the question are the benefits of the having v-nodes in the cluster.
Please remember that number of vnodes also impact the cluster-wide operations. If you increase the number of vnodes. During repair cycle increase the number of repairs.