1

3 node cluster and RF of 3 means every node has all the data. Consistency is ONE. So when queried for some data on node-1, ideally as node-1 has all the data it should be able to complete my query.

But when I checked how my query is running using 'tracing on', it shows me that it connects to node-2 also, which is not needed as per my understanding.

Am I missing something here ? Thanks in advance.

Edited ::

Added the output of 'tracing on'. It can be seen in the image that, node 10.101.201.3 has contacted 10.101.201.4

Shiva Prasad
  • 33
  • 1
  • 5

1 Answers1

1

3 node cluster and RF of 3 means every node has all the data.

Just because every node has 100% of all data, does not mean that every node has 100% of all token ranges. The token ranges in a 3 node cluster will be split-up evenly @ ~33% each.

In short, node-1 may have all of the data, but it's only primarily responsible for 33% of it. When the partition key is hashed, the query is likely being directed toward node-2 because it is primarily responsible for that partition key...despite the fact that the other nodes contain secondary and tertiary replicas.

cqlsh. Does this change if I'm running the query from application code?

Yes, because the specified load balancing policy (configured in app code) can also affect this behavior.

Aaron
  • 55,518
  • 11
  • 116
  • 132