Hi I'm using 4+ version datastax cassandra driver and I'm aware that if using the default LB policy, local data center should be provided explicitly and the node provided as the contact points but are not in the local data center will be ignored.
Then, if the application want to read Quorum which requires taking all nodes across all data centers into account, how the nodes not in the local data center be treated (because they are ignored)?
The contact points do not have anything to do with replicas and consistency levels.
The contact points are the Cassandra nodes the driver chooses to contact and use as the coordinator for the request in the query plan for each request.
It is the coordinator's responsibility to contact the replicas required by the configured consistency level, regardless of whether only local replicas are required (LOCAL_ONE
, LOCAL_QUORUM
) or replicas in a remote DC (QUORUM
, ALL
).
For more information on how the Java driver picks coordinators, see Load balancing with the Cassandra Java driver. I also recommend reading the Tunable consistency section of How consistent read and write operations are handled in Cassandra. Cheers!