I am using DCAwareRoundRobinPolicy for my cassandra connection. But the time taken for querying by my driver is comparatively larger than when i am using the same connection parameters in php.
The datastax driver in php uses the function to the the same:
withDatacenterAwareRoundRobinLoadBalancingPolicy(
string $localDatacenter, int $hostPerRemoteDatacenter,
bool $useRemoteDatacenterForLocalConsistencies )
When the last parameter is set as false, only local hosts are used for querying. But this parameter setting is not available in gocql driver. And I am guessing that this may be causing the issue I am facing. Correct me if I am wrong.
Please help in this regard what can be done.
I was not facing this issue when I had only 1 node in cluster.
For nodetool status :
Datacenter: DC1
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 206.* 298.89 GB 1 ? de58dea3-7d16-4318-8549-a34d42aa3d65 RAC1
UN 206.* 287.63 GB 1 ? b312ce3d-c23f-476e-9396-3f8ec2219425 RAC1
UN 206.* 280.08 GB 1 ? c82f1f90-bca6-4438-bc43-68bf370a555a RAC1
UN 206.* 260.61 GB 1 ? 95b33f1f-d282-42ea-974b-987552932535 RAC1
UN 206.* 301.05 GB 1 ? 4725e34f-9368-4c18-85ef-6cd96352b73e RAC1
Datacenter: DC3
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns Host ID Rack
UN 173.* 262.16 GB 256 ? 283afa18-d085-4ff0-b410-e0f5fd368669 RAC1
UN 173.* 292.17 GB 256 ? b59a0d6c-2f77-4912-a0ad-eae3687aabbc RAC1
UN 173.* 253.07 GB 256 ? 44b6e01a-f6f1-471c-95a2-ff66f6188438 RAC1
UN 173.* 281.6 GB 256 ? 43d1a656-5aeb-42a9-bfee-c11f1a0a76dc RAC1
UN 173.* 250.6 GB 256 ? ceb40080-012c-4446-8a6b-220ffa472ddc RAC1