Hi there,
I have a question about the connections between the java driver and coordinator.
Assume we have a 5 node cluster in the same data center: 1, 2, 3, 4, 5. I choose node 1 to be the node where the java driver is. Then it'll pick the coordinator according to different load balancing policies. Assume that node 2 is chosen as the coordinator. If the replication factor is set to be 1 and node 3 is the replica node. Then on node 1, I'm writing data into the cluster.
Then the question comes: what's the process when sending data? Will the java driver (node 1) send data to the coordinator (node 2) firstly, then node 2 send data to the replica (node 3)? Or the java driver (node 1) communicate with the coordinator (node 2), knowing that node 3 is the replica, and it'll send data to the replica?
To make it simple:
1. java driver (node 1) -----send data to coordinator----->coordinator (node 2)------send data to replica----> replica(node 3)
2. java driver (node 1) <-------communicate with coordinator------->coordinator (node 2)
|
|
|_____send data to replica_____________________> replica (node 3)
Which one is right?
Thanks for your help.
Jun