CQL for Cassandra 2.x

CQL keyspace and table properties

The CQL WITH clause specifies keyspace and table properties in these CQL commands:

CQL keyspace properties

CQL supports setting the following keyspace properties in addition to naming data centers.
  • class

    The name of the replication strategy: SimpleStrategy or NetworkTopologyStrategy. You set the replication factor independently for each data center.

  • replication_factor

    The replication_factor property is used only when specifying the SimpleStrategy, as shown in CREATE KEYSPACE examples. The replication factor value is the total number of replicas across the cluster.

For production use or for use with mixed workloads, create the keyspace using NetworkTopologyStrategy. SimpleStrategy is fine for evaluation purposes. NetworkTopologyStrategy is recommended for most deployments because it is much easier to expand to multiple data centers when required by future expansion.

You can also configure the durable writes property when creating or altering a keyspace.

Show/hide