Cassandra cluster, wants to replicate across some datacenters but not all

Viewed 265

I am looking at documentation but I can't find how to do what I need. I need to set up Apache Cassandra (not datastax, and for now I only have one test cluster) for the following scenario:

I need 1 cluster spanning 4 datacenters (some might be physical datacenters in different geographical locations, some might be AWS).

In this cluster, I need 3 keyspace. One keyspace replicates across all datacenters, the remaining keyspace need to only replicate to 1 datacenter.

+---------------------------------------------------+
|    DC 1    |    DC 2    |    DC 3    |    DC 4    |
+---------------------------------------------------+
| Keyspace A | Keyspace A | Keyspace A | Keyspace A | 
+---------------------------------------------------+
|            |            | Keyspace B | Keyspace B | 
+---------------------------------------------------+
| Keyspace C | Keyspace C |            |            | 
+---------------------------------------------------+

The reason is that data in KeyspaceB and KeyspaceC by legal obligation have to be kept in different regions. Can I get away with one cluster configuring replication factor 0 or something for the empty spaces in the above table or do I need 3 different clusters?

Cheer, Vince.

1 Answers
Related