CLI keyspace and table storage configuration

Cassandra stores storage configuration attributes in the system keyspace.

Cassandra stores storage configuration attributes in the system keyspace. You set storage configuration attributes on a per-keyspace or per-table basis programmatically or using a client application, such as CLI or Thrift.

Keyspace attributes 

A keyspace must have a user-defined name, a replica placement strategy, and options that specify the number of copies per data center or node.

Attribute Default value
name NA
placement_strategy SimpleStrategy
strategy_options N/A (container attribute)
durable_writes N/A (container attribute)
Required. The name for the keyspace.
Required. Determines how Cassandra distributes replicas for a keyspace among nodes in the ring. Values are:
  • SimpleStrategy or org.apache.cassandra.locator.SimpleStrategy
  • NetworkTopologyStrategy or org.apache.cassandra.locator.NetworkTopologyStrategy

NetworkTopologyStrategy requires a snitch to be able to determine rack and data center locations of a node. For more information about replication placement strategy, see Data replication.

Specifies configuration options for the chosen replication strategy class. The replication factor option is the total number of replicas across the cluster. A replication factor of 1 means that there is only one copy of each row on one node. A replication factor of 2 means there are two copies of each row, where each copy is on a different node. All replicas are equally important; there is no primary or master replica. As a general rule, the replication factor should not exceed the number of nodes in the cluster. However, you can increase the replication factor and then add the desired number of nodes.

When the replication factor exceeds the number of nodes, writes are rejected, but reads are served as long as the desired consistency level can be met.

For more information about configuring the replication placement strategy for a cluster and data centers, see Choosing keyspace replication options.

(Default: true ) When set to false , data written to the keyspace bypasses the commit log. Be careful using this option because you risk losing data.