system.graph('graph_name').replication("{'class' : 'NetworkTopologyStrategy', 'dc1' : 3, 'dc2' : 2}")


Create a new graph. The graph_name specified is used to create two DSE database keyspaces, graph_name and graph_name_system, and can only contain alphanumeric and underscore characters.


Create a new graph and set the graph_name replication configuration using replication() as well as the graph_name_system configuration using systemReplication(). DSE database settings for replication factor are used, either SimpleStrategy for a single datacenter or NetworkTopologyStrategy for multiple datacenters.

The default replication strategy for a multi-datacenter graph is NetworkTopologyStrategy, whereas for a single datacenter, the replication strategy will default to SimpleStrategy. The number of nodes determines the default replication factor:

Replication factors for different numbers of nodes
number of nodes per datacenter graph_name replication factor graph_name_system replication factor


number of nodes per datacenter

number of nodes per datacenter

greater than 3



  replication("{'class' : 'NetworkTopologyStrategy', 'dc1' : 3, 'dc2' : 2 }").
  systemReplication("{'class' : 'NetworkTopologyStrategy', 'dc1' : 3, 'dc2' : 2 }").

The resulting list:


The replication settings can be verified using the cqlsh tool, running the CQL command DESCRIBE keyspace food command:


with a result:

CREATE KEYSPACE food WITH replication = {'class': 'NetworkTopologyStrategy', 'dc1: '3', 'dc2' : 2 }  AND durable_writes = true;

In addition to setting the replication factor for the graph_name keyspace, the replication factor for the graph_name_system must also be set.

The replication factor and system replication factor cannot be altered once set for the graph_name and graph_name_system keyspaces.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000,