Single-token architecture deployment

Steps for deploying when you are not using virtual nodes (vnodes).

Follow these steps only when not using virtual nodes (vnodes).


  • Have a basic understanding of tokens and Database internals.
  • Ensure DataStax Enterprise is installed on each node.
  • Choose a name for the cluster.
  • Take note of the total number of nodes in the cluster.
  • For a mixed-workload cluster, determine the purpose of each node.
  • Determine which nodes are seed nodes. Do not make all nodes seed nodes. Seed nodes are not required for DSE Search datacenters. Read Internode communications (gossip).
  • If using multiple datacenters, develop a naming convention for each datacenter and rack, for example: DC1, DC2 or 100, 200 and RAC1, RAC2 or R101, R102.
  • Use the yaml_diff tool to review and make appropriate changes to the cassandra.yaml configuration file.
    The location of the cassandra.yaml file depends on the type of installation:
    Package installations /etc/dse/cassandra/cassandra.yaml
    Tarball installations install_location/resources/cassandra/conf/cassandra.yaml


  1. Suppose you install DataStax Enterprise on these nodes:
    • node0 (seed1)
    • node1
    • node2
    • node3 (seed2)
    • node4
    • node5
  2. Calculate the token assignments using the information on Calculating tokens for single-token architecture nodes.
    Table 1. Single Data Center
    Node Token
    node0 0
    node1 21267647932558653966460912964485513216
    node2 42535295865117307932921825928971026432
    node3 63802943797675961899382738893456539648
    node4 85070591730234615865843651857942052864
    node5 106338239662793269832304564822427566080
    Table 2. Multiple Data Centers
    Node Token Offset Data Center
    node0 0 NA DC1
    node1 56713727820156410577229101238628035242 NA DC1
    node2 113427455640312821154458202477256070485 NA DC1
    node3 100 100 DC2
    node4 56713727820156410577229101238628035342 100 DC2
    node5 113427455640312821154458202477256070585 100 DC2
  3. If the nodes are behind a firewall, open the required ports for internal/external communication. See Configuring firewall port access.
  4. If DataStax Enterprise is running, stop the nodes and clear the data:
    • Installer-Services and Package installations:
      sudo service dse stop
      $ sudo rm -rf /var/lib/cassandra/*  # Clears the data from the  default directories
    • Installer-No Services and Tarball installations:

      From the install directory:

      sudo bin/dse cassandra-stop
      $ sudo rm -rf /var/lib/cassandra/*  # Clears the data from the  default directories 
      Note: If you are clearing data from an AMI installation for restart, you need to preserve the log files.
  5. Set the properties in the cassandra.yaml file for each node.
    The location of the cassandra.yaml file depends on the type of installation:
    Package installations /etc/dse/cassandra/cassandra.yaml
    Tarball installations install_location/resources/cassandra/conf/cassandra.yaml
    Important: After making any changes in cassandra.yaml, you must restart the node for the changes to take effect.

    Properties to set:

    • initial_token: token
    • num_tokens: 1
    • -seeds: internal_IP_address of each seed node
    • listen_address: empty

      If not set, Cassandra asks the system for the local address, the one associated with its hostname. In some cases Cassandra doesn't produce the correct address and you must specify the list_address.

    • endpoint_snitch: snitch

      For more information, see About Snitches.

    • auto_bootstrap: false

      Add the bootstrap setting only when initializing a fresh cluster with no data.

    • If you are using a cassandra.yaml from a previous version, remove the following options, as they are no longer supported by DataStax Enterprise:
      ## Replication strategy to use for the auth keyspace.
      auth_replication_strategy: org.apache.cassandra.locator.SimpleStrategy
          replication_factor: 1


    If using more than one datacenter, include at least one seed node from each datacenter. It is a best practice to have more than one seed node per data center.

    cluster_name: 'MyDemoCluster'
    num_tokens: 256
      - class_name: org.apache.cassandra.locator.SimpleSeedProvider
             - seeds: ","
  6. In the file, use your naming convention to assign datacenter and rack names to the IP addresses of each node, and assign a default datacenter name and rack name for unknown nodes.
    The default location of the file depends on the type of installation:
    Installer-Services and Package installations /etc/dse/cassandra/
    Installer-No Services and Tarball installations install_location/resources/cassandra/conf/


    # Cassandra Node IP=Data Center:Rack
    # default for unknown nodes
  7. After you have installed and configured DataStax Enterprise on all nodes, start the seed nodes one at a time, and then start the rest of the nodes:
    Note: If the node has restarted because of automatic restart, you must stop the node and clear the data directories, as described above.
  8. Check that your cluster is up and running:
    • Installer-Services and Package installations: $ nodetool status
    • Installer-No Services and Tarball installations: $ install_location/bin/nodetool status