Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

Gangadhara M.B avatar image
Gangadhara M.B asked ·

Should we change the replication for system keyspaces in Apache Cassandra 3.11.6?

New apache cassandra cluster version 3.11.6 is being built on AWS EC2 Centos with single DC 12 nodes having EC2SNITCH and going to set networkTopology for all user specific keyspace.

In the new cluster i changed only RF of system_auth =3 and did not change strategy (default simplestrategy).

Now should we need to consider change strategy and RF for system defined keyspaces system_trace and system_distributor ?

Thanks

Gangadhara

cassandrareplication
10 |1000 characters needed characters left characters exceeded

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 ·

We recommend changing the replication strategy of system keyspaces configured with SimpleStrategy to NetworkTopologyStrategy with 3 replicas in each DC. Specifically these keyspaces:

CREATE KEYSPACE system_auth WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}  AND durable_writes = true;
CREATE KEYSPACE system_distributed WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'}  AND durable_writes = true;
CREATE KEYSPACE system_traces WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '2'}  AND durable_writes = true;

Note that the keyspace system_traces holds trace data if you have enabled query tracing. By default trace data expires after 24 hours so its replication settings isn't so critical.

For completeness, we do not recommend you alter keyspaces which have LocalStrategy. Specifically these keyspaces:

CREATE KEYSPACE system_schema WITH replication = {'class': 'LocalStrategy'}  AND durable_writes = true;
CREATE KEYSPACE system WITH replication = {'class': 'LocalStrategy'}  AND durable_writes = true;

Cheers!

2 comments Share
10 |1000 characters needed characters left characters exceeded

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

On what scenarios we may to need consider changing strategy from simpleStrategy to NetworkTopology for keyspaces system_distributed and system_traces ?


  1. ALTER KEYSPACE system_auth WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '3'} AND durable_writes = true;
  2. CREATE KEYSPACE system_distributed WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '3'} AND durable_writes = true;
  3. CREATE KEYSPACE system_traces WITH replication = {'class': 'NetworkTopologyStrategy', 'replication_factor': '3'} AND durable_writes = true;
0 Likes 0 · ·

I think you misunderstood my answer. We recommend that you alter all the 3 keyspaces to use NetworkTopologyStrategy. Cheers!

0 Likes 0 · ·