question

debasis.tcs_69445 avatar image
debasis.tcs_69445 asked Erick Ramirez answered

Can we stop replication of one keyspace between 2 DCs?

Hi Team

We are using Cassandra 3.0 community version. We have requirement to stop replication of particular key space between DC.

For example :-

dc200

CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'dc100': '0', 'dc200': '3'} AND durable_writes = true;

dc100

CREATE KEYSPACE test WITH replication = {'class': 'NetworkTopologyStrategy', 'dc100': '3', 'dc200': '0'} AND durable_writes = true;

So that tables on this keyspace will not replicate between each site.

But I am not able to do it because once the keyspace created in one DC , is getting replicated to another intrinsically

Is there anway to get it work with out creating separate keyspace name.

replication
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered

The quick answer is no.

The schema (including definitions of keyspaces) are globally unique across the cluster. It is not possible to have 2 different schemas of a single keyspace in the same cluster.

If you need to have a different schema, you will need to create a new keyspace. Cheers!

Share
10 |1000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.