0

I would like to configure the following multi-datacenter Cassandra cluster:

  • DC-EUROPE has 3 Cassandra nodes (1.1.1.1, 1.1.1.2, 1.1.1.3)
  • DC-ASIA has 3 Cassandra nodes (2.2.2.1, 2.2.2.2, 2.2.2.3)
  • Each DC has an eventually consistent full-copy (1:1) of the keyspace. Services running in DC-EUROPE will always query DC-EUROPE and services running in DC-ASIA will always query DC-ASIA.
  • The data has a replication factor of 2 across the 3 nodes in each DC.

How could I setup this configuration using NetworkTopologyStrategy ?

1

The NetworkTopologySettings needs to be specified as part of the create keyspace statement.

1

The correct configuration here would be the following:

CREATE KEYSPACE foo WITH REPLICATION = { 
   'class': 'NetworkTopologyStrategy', 
   'DC-EUROPE': 2, 
   'DC-ASIA': 2
};

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.