Is it possible to use NetworkTopologyStrategy when creating a keyspace and add 
data centers later?

I am just starting with an MVP application and I don't expect much traffic or 
data. Thus I have created only one data center. However, I'll like to add more 
data centers later if needed

I notice that the replication factor for each data center needs to be specified 
at the time of keyspace creation

CREATE KEYSPACE "Excalibur"

  WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc1' : 3, 'dc2' : 
2};

As I only have dc1 at the moment, could I just do

CREATE KEYSPACE "Excalibur"

  WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc1' : 3};

and when I have another datacenter say dc2, could I edit the Excalibur keyspace?

ALTER KEYSPACE "Excalibur"

  WITH REPLICATION = {'class' : 'NetworkTopologyStrategy', 'dc2' : 2};



or can I start with SimpleStrategy now and change to NetworkTopologyStrategy 
later? I suspect this might not work as I think this needs changing snitch etc.


Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

Reply via email to