0
votes

I" have an existing cassandra cluster running in AWS. It has total 6 nodes in the same data center but in multiple regions. We are using cassandra version 2.2.8 in production. There are two existing keyspaces already present in the production environment. I want to add a new keyspace to the production cluster.

I am new to Cassandra so looking for following answers:

  • Can I add new keyspace in the existing production cluster without taking the cluster down?
  • Any best practices you would recommend to add the new keyspace to the existing cluster.
  • Possible steps to add new Keyspace?

I really appreciate your help!

1

1 Answers

0
votes

Yes, you can add keyspaces online.

When you add a keyspace, you have to choose the Replication Factor. As you have AWS Multi Region, probably you are using Ec2MultiRegionSnitch as endpoint_snitch, right?

If you do, probably you configured dc_suffix=_XYZ and now you have your DCs like this: "us-east_XYZ" (See on nodetool status). Then, you can use something like this:

CREATE  KEYSPACE my_keysace 
WITH REPLICATION = { 
'class' : 'NetworkTopologyStrategy','us-east_XYZ' : 2, 'us-west_XYZ':2 }
AND DURABLE_WRITES =  true

See docs: CREATE KEYSPACE