Creating a keyspace

Add a keyspace and set the replication factor.

A keyspace is analogous to an SQL database. The keyspace is the top level container for database objects. The keyspace replication strategy and replication factor control data availability for a set of tables in each datacenter of the cluster.
  • SimpleStrategy: Applies the same replication setting across the cluster. Only use this setting on single node test or development environments.
  • NetworkTopography: Applies the replication setting per datacenter. Use in production environments.
  • EverywhereStrategy: The default replication strategy for the dse_system and solr_admin keyspaces. Do not use or alter any instances of EverywhereStrategy.


  1. Verify the datacenter name using nodetool status.
    nodetool status

    Example output:

    Datacenter: datacenter1
    |/ State=Normal/Leaving/Joining/Moving
    --  Address         Load       Tokens       Owns    Host ID                               Rack
    UN  4.97 MiB   1            ?       c9027497-011c-4390-ae59-e4ed1ac794cc  rack1
    UN  5.16 MiB   1            ?       af2af8ec-5fa2-4a04-ac9c-c75669d8d3a0  rack1
  2. Verify the datacenter names, which are case-sensitive. Ensure that the datacenter name case matches exactly in the next step.
  3. Start cqlsh and create a keyspace.
    WITH replication = {
      'class' : 'SimpleStrategy',
      'replication_factor' : 1
  4. Switch to the keyspace.
    USE cycling;