Hi there,
I have some questions about the replicas selection.
Let's say that we have 2 data centers: DC1 and DC2, the figure also be got
from link here:
https://docs.datastax.com/en/cassandra/1.2/cassandra/images/write_access_multidc_12.png.
There're 10 nodes in each data center. We set the replication factor to be 3
and 3 in each data center, which means there'll be 3 and 3 replicas in each
data center.
(1) My first question is how to choose which 3 nodes to write data to, in
the link above, the 3 replicas are node 1, 2, 7. But, is there any mechanism to
select these 3?
(2) Another question is about the remote coordinator, the previous figure
shows that node 10 in DC1 will write data to node 10 in DC 2, then node 10 in
DC2 will write 3 copies to 3 nodes in DC2.
But, another figure from datastax shows different method, the figure can be
found here,
https://docs.datastax.com/en/cassandra/2.1/cassandra/dml/architectureClientRequestsMultiDCWrites_c.html.
It shows that node 10 in DC 1 will send directly 3 copies to 3 nodes in DC2,
without using remote coordinator.
I'm wondering which case is true, because in multiple data center, the time
duration for these two methods varies a lot.
Also, is there any mechanism to select which node to be remote coordinator?
Thanks!
Jun