anchoring cassandra queries to particular DC

19 views
Skip to first unread message

Ganesh M

unread,
Sep 6, 2016, 6:01:10 AM9/6/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
Hi,


We have multiple DCs to store user data.
We are facing a problem if the data is stored in DC1 and it's fetched from DC2 and there's delay in data sync across DCs.
In the above case we may not find the data in DC2.

In order to solve this problem we're planning to anchor the users to particular DC and we want to execute queries in particular DC based on the user id.

Is there any provision in cpp driver to choose the DC to execute individual query?


Regards
Ganesh

Michael Penick

unread,
Sep 6, 2016, 6:50:37 PM9/6/16
to cpp-dri...@lists.datastax.com
That would require a "preferred datacenter" load balancing policy and no such feature currently exists, but you could create two sessions each with a different local datacenters (set via `cass_cluster_set_load_balance_dc_aware()`), one for DC1 and another for DC2.

Mike

Ganesh

--
You received this message because you are subscribed to the Google Groups "DataStax C++ Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-driver-user+unsubscribe@lists.datastax.com.

Message has been deleted

Ganesh M

unread,
Sep 8, 2016, 7:47:10 AM9/8/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
Thank you Michael for the response.
Can I know if there's any plan to provide this load balancing policy in near future. I think most of the products with mutli DC setup will need this policy.


Regards
Ganesh

Reply all
Reply to author
Forward
0 new messages