Subodh
Subodh

Reputation: 19

Configuring Cassandra replication in failover mode between two datacenters

We have implemented a four node Cassandra cluster in AWS and now wish to migrate the same data to Azure.currently when we are trying to do Cassandra replication we observed it is in a active active mode and load get splits among all servers of the primary and secondary sites this is leading to data inconsistency in results for queries made on the primary site as it somehow balances the load and gets data rendered from the secondary site we would like your help to know if that can be restricted or there is a fail over sync possible in Cassandra. Any suggestions shall be much appreciated. Thanks

Upvotes: 0

Views: 149

Answers (2)

Aravind Chamakura
Aravind Chamakura

Reputation: 339

Try DCAwareRoundRobinPolicy and specify .withLocalDc("Your Data Center to connect") and use Consistency of Local_one or Local_quorum.

Upvotes: 0

Jeff Beck
Jeff Beck

Reputation: 3938

You want to use the NetworkTopologyStrategy for replication then your app code should do LOCAL_ONE consistency etc. As for the failover you can have your apps reboot configured to point at a particular DC. Or you could have the secondary site have its own servers ready that you fail over to the whole site.

Upvotes: 2

Related Questions