Question-: Which of the following are valid for the vnodes in a Cassandra cluster? A. There are by default 128 vnodes for each node. B. There are by default 8 vnodes for each node. C. To configure you have to set num_tokens in Cassandra.yaml file. D. To configure you have to set num_vnodes in Cassandra.yaml file. E. When we use the vnodes Cassandra automatically assigns the token range.
Answer: A,C,E
Explanation: 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. - There are by default 128 vnodes for each node. - To configure you have to set num_tokens in Cassandra.yaml file. - When we use the vnodes Cassandra automatically assigns the token range.
Admin only
Question-: Which of the following statement true with regards to Cassandra cluster gossip protocol? A. In cluster every node initiates a gossip round every second and can choose between 1 to 3 nodes for gossip. B. Gossip can only be initiated by the seed nodes. C. Nodes can gossip with any other node in the cluster but they favor the seed node. D. Node always track which node they have gossiped. To avoid the re-gossiping. E. Gossip protocol transfer client data from one node to another node.
Answer: A,C Exp: Gossip is a peer-to-peer protocol in which nodes periodically exchange state information about themselves and about other nodes they know about. It runs every second and can exchange information with upto 3 nodes in the cluster. A gossip message has a version associated with it, so that during a gossip exchange, older information is overwritten with the most current state for a particular node.
To prevent problems in gossip communication, use the same list of seed nodes for all the nodes in a cluster. This is most critical the first time a node starts up. By default, a node remembers other nodes it has gossiped with between subsequent restarts.
In a multi-data-center setup, we must include at least one node from each datacenter in the seed list. Making every node a seed node is not recommended because of increased maintenance and reduced gossip performance.
Remember: - Node does not gossip with any specific node in the cluster. They can start with any node. But they favor the seed nodes. - Gossip protocol has affected on the network like a. Constant small use of network traffic. b. However, it does not cause any network spikes c. It does not transfer the client data; it only transfers the metadata about the nodes.
Admin only
Question-: In Cassandra snitch is used for A. To find all the slow performing nodes in the big Cassandra cluster. B. This is a protocol for Gossiping in the Cassandra cluster. C. It finds the seed nodes in the cluster. D. All of the above E. None of the above
Answer: E Exp: In Cassandra snitch helps in finding the nodes location like in which datacenter and racks it belongs to. It let Cassandra cluster know about the topology so that requests are routed efficiently and allows Cassandra to distribute replicas by grouping nodes into datacenter and racks. Snitch are configured using Cassandra.yaml file.
So, snitch does not help any of the following - Finding slow performing node in the cluster. - It is not a protocol for gossiping but rather a Node location finder. - We list all the seed node information on each node. So again, snitch is not used for.