question

Gangadhara M.B avatar image
Gangadhara M.B asked anshita333saxena_187432 commented

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

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 anshita333saxena_187432 commented

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!

3 comments 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.

Gangadhara M.B avatar image Gangadhara M.B commented ·

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 ·
Erick Ramirez avatar image Erick Ramirez ♦♦ Gangadhara M.B commented ·

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

0 Likes 0 ·
anshita333saxena_187432 avatar image anshita333saxena_187432 Erick Ramirez ♦♦ commented ·

Hi @Erick Ramirez , could you please provide a reference doc or write here why should we alter the replication strategy from SimpleStrategy to NetworkTopologyStrategy ?

Only this statement is written on the official doc but why to set that is not written anywhere:
"For production work, the NetworkTopologyStrategy class must be set."

0 Likes 0 ·