• Glossary
  • Support
  • Downloads
  • DataStax Home
Get Live Help
Expand All
Collapse All

DataStax Project Mission Control

    • Overview
      • Release notes
      • FAQs
      • Getting support
    • Installing DataStax Mission Control
      • Planning your install
      • Server-based Runtime Installer
        • Services setup with DataStax Mission Control Runtime Installer
      • Bring your own Kubernetes
        • Installing Control Plane
        • Installing Data Plane
    • Migrating
      • Migrating DSE Cluster to DataStax Mission Control
    • Managing
      • Managing DSE clusters
        • Configuring DSE
          • Authentication
          • Authorization
          • Securing DSE
          • DSE Unified Authorization
        • Cluster lifecycle
          • Creating a cluster
          • Creating a single-token cluster
          • Creating a multi-token cluster
          • Terminating a DSE cluster
          • Upgrading a DSE cluster
        • Datacenter lifecycle
          • Adding a DSE datacenter
          • Terminating a DSE datacenter
        • Node lifecycle
          • Adding DSE nodes
          • Terminating DSE nodes
          • Using per-node configurations
      • Managing DataStax Mission Control infrastructure
        • Adding a node to DataStax Mission Control clusters
        • Terminating a node from DataStax Mission Control clusters
        • Storage classes defined
      • Managing DataStax Mission Control resources
        • Accessing Admin Console
        • Configuring DataStax Mission Control
        • Generating a support bundle
    • Operating on DSE Clusters
      • Cleanup
      • Rebuilding
      • Replacing a node
      • Rolling restart
      • Upgrading SSTables
    • Reference
      • DSECluster manifest
      • CassandraTask manifest
  • DataStax Project Mission Control
  • Managing
  • Managing DSE clusters
  • Cluster lifecycle
  • Creating a single-token cluster

Creating Single-token DSE Clusters

DataStax Mission Control is current in Private Preview. It is subject to the beta agreement executed between you and DataStax. DataStax Mission Control is not intended for production use, has not been certified for production workloads, and might contain bugs and other functional issues. There is no guarantee that DataStax Mission Control will ever become generally available. DataStax Mission Control is provided on an “AS IS” basis, without warranty or indemnity of any kind.

If you are interested in trying out DataStax Mission Control please contact your DataStax account team.

Overview

Carefully generating tokens is key to maintaining overall cluster balance, and not a trivial task. Before the advent of DataStax Mission Control, using previous tools or manually allocating a token were the choices for setting a token and ensuring the best cluster balance. Even so, optimal balance is not guaranteed. DataStax Mission Control eases the task of creating single-token clusters.

Single-token Cassandra clusters

each physical node owns only one token range in the token ring.

Virtual nodes (vnodes)

each node in the cluster owns two or more token ranges. Vnodes mitigate the challenge of managing unbalanced clusters, where data is not distributed evenly amongst the nodes.

Historically, and by default, tokens are assigned through a Cassandra (C*) allocation algorithm or DSE 6.8’s token-generator tool. In DataStax Mission Control, config maps aid in implementing token-assignments.

Token range recommended limits

Table 1. Recommended token ranges
Version # token ranges

Cassandra v3.x

256 tokens per node

Cassandra 4.x

256 tokens per node

DSE 6.8

16 tokens per node

DataStax Mission Control

Procedure

This details how to set the num_tokens: option to 1.

Create a single-token cluster with DataStax Mission Control. This example works with a single datacenter that has a single-rack cluster with six nodes. The replication factor (RF) is set to DataStax Mission Control’s default of 3. Modify the DSECluster manifest to explicitly override the default of 16 in the config:cassandraYaml:num_tokens section. From this definition, DataStax Mission Control automatically generates initial tokens.

  1. Required: Modify the DSECluster manifest, explicitly specifying config:cassandraYaml:num_tokens: 1, as follows:

    apiVersion: missioncontrol.datastax.com/v1alpha1
    kind: DSECluster
    metadata:
      name: dse-cluster
    spec:
      serverVersion: 6.8.26
      config:
        cassandraYaml:
          num_tokens: 1
      datacenters:
        - metadata:
            name: dc1
          size: 6

    This change necessarily overrides the default number of tokens (16) that DSE sets per node.

    Do not adjust the initial_token specification in the DSECluster manifest. You cannot manually vary the configuration option based on the node to which it is applied. Let DataStax Mission Control generate the initial tokens per node for you. See Configure a DSE node.

  2. Issue the following command from a node running DSE and review the resulting cluster:

    nodetool -u dse-cluster-superuser -pw <omitted> ring <keyspace-name>

    Sample output:

    Datacenter: dc1
    ==========
    Address      Rack    Status State   Load        Owns    Token
                                                             6148914691236517204
    10.100.3.9   default Up     Normal  144.48 KiB  50.00%  -9223372036854775808
    10.100.6.10  default Up     Normal  209.15 KiB  50.00%  -6148914691236517206
    10.100.1.10  default Up     Normal  118.17 KiB  50.00%  -3074457345618258603
    10.100.0.11  default Up     Normal  209.87 KiB  50.00%  -1
    10.100.2.9   default Up     Normal  170.66 KiB  50.00%  3074457345618258602
    10.100.5.12  default Up     Normal  200.67 KiB  50.00%  6148914691236517204

    The result shows a perfectly balanced ring with 6 token ranges of equal size. The Owns column reveals that each node holds 50% of the data. This is the expected data ownership because every node is replicating 3 token ranges of ⅙ each of the whole ring.

Allowing DataStax Mission Control to assign tokens requires that you do not delete or modify the ConfigMaps that DataStax Mission Control uses to create the required per-node configuration.

If you intend to use custom per-node configurations, then you must manually compute tokens per node. See Configure a DSE node.

What’s next

Rebalance an existing cluster. Assign tokens to new nodes that are joining an existing cluster.

Creating a cluster Creating a multi-token cluster

General Inquiries: +1 (650) 389-6000 info@datastax.com

© DataStax | Privacy policy | Terms of use

DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.

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.

landing_page landingpage