Question-: Which of the following is you should define when setting up multiple datacenter cluster? A. Use the NetworkTopologyStrategy B. Use the SimpleStrategy C. You should use the LOCAL_ONE or LOCAL_QUORUM consistency level to avoid latency during write operation. D. You should use the EACH consistency level to avoid latency during write operation. E. You should specify the Snitch.
Answer: A, C, E
Explanation: While using the multiple datacenter setup you should keep following things in the mind at least so that your set up works as expected.
Question-: You have Cassandra cluster setup using one datacenter having total nodes in it. You created keyspace using the following command. ALTER KEYSPACE HE_KEPSPACE WITH replication={‘class’ : ‘NetworkTopologyStrategy’ , ‘DC1’ : 1 , ‘DC2’ : 2}
Which of the following statement is true?
A. This command would fail because there is only one datacenter and you have defined the two datacenters in the command. B. This command would be successful and local datacenter would be created using the 3rd node in the cluster. C. This command would fail as this would not be able to create 3 copy of the data. D. This command would be successful, without any error.
Answer: D Exp: Yes, this command would successful even you don’t have two datacenter. This is one of the good strategies to preplan your Keyspace setup. In future, you would like to add new Datacenter in the cluster and that time Keyspace would be replicated on another datacenter.
Question-: If you are adding a new datacenter to your existing cluster then which of the following command you should use? A. nodetool repair B. nodetool rebuild C. nodetool update D. nodetool refresh
Answer: B Exp: When you are adding a new datacenter to your existing Cassandra cluster then you should use the “nodetool rebuild� command. This command would operate on the multiple nodes in the cluster and stream the data only from single source replica when rebuilding a token range. This command should be used when you are adding a new datacenter to an existing cluster.