Single data center deployment

A deployment scenario with a mixed workload cluster has only one data center for each type of workload.

In this scenario, a mixed workload cluster has only one data center for each type of node. For example, if the cluster has 3 Hadoop nodes, 3 Cassandra nodes, and 2 Solr nodes, the cluster has 3 data centers, one for each type of node. In contrast, a multiple data center cluster has more than one data center for each type of node.

In single data center deployments, data replicates across the data centers automatically and transparently. No ETL work is necessary to move data between different systems or servers. You can configure the number of copies of the data in each data center and Cassandra handles the rest, replicating the data for you.

To configure a multiple data center cluster, see Multiple data center deployment.

Prerequisites

  • DataStax Enterprise is installed on each node.
  • Choose a name for the cluster.
  • For a mixed-workload cluster, determine the purpose of each node.
  • Get the IP address of each node.
  • Determine which nodes are seed nodes. (Seed nodes provide the means for all the nodes find each other and learn the topology of the ring.)
  • Other possible configuration settings are described in the cassandra.yaml configuration file.
  • Set virtual nodes correctly for the type of data center. DataStax recommends using virtual nodes only on data centers running purely Cassandra workloads. See Setting up virtual nodes in About virtual nodes.

In DataStax Enterprise 3.0.1 and later, the default consistency level has changed from ONE to QUORUM for reads and writes. This change resolves the problem of finding a CassandraFS block when using consistency level ONE on a Hadoop node.

Procedure

This configuration example describes installing a six node cluster spanning two racks in a single data center.

Set properties for each node in the cassandra.yaml file. This file is located in different places depending on the type of installation:

  • Packaged installs: /etc/dse/cassandra/cassandra.yaml
  • Tarball installs: install_location/resources/cassandra/conf/cassandra.yaml
Note: After making any changes in the cassandra.yaml file, you must restart the node for the changes to take effect.

  1. Suppose the nodes have the following IPs and one node per rack will serve as a seed:
    • node0 110.82.155.0 (Cassandra seed)
    • node1 110.82.155.1 (Cassandra)
    • node2 110.82.155.2 (Cassandra)
    • node3 110.82.155.3 (Analytics seed)
    • node4 110.82.155.4 (Analytics)
    • node5 110.82.155.5 (Analytics)
    • node6 110.82.155.6 (Search - seed nodes are not required for Solr.)
    • node7 110.82.155.7 (Search)
  2. If the nodes are behind a firewall, open the required ports for internal/external communication. See Configuring firewall port access.
  3. If DataStax Enterprise is running, stop the nodes and clear the data:
    • Packaged installs:
      $ sudo service dse stop
      $ sudo rm -rf /var/lib/cassandra/* ## Clears the data from the  default directories
    • Tarball installs:

      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.
  4. Modify the following property settings in the cassandra.yaml file for each node:
    • num_tokens: 256 for Cassandra nodes
    • num_tokens: 1 for Hadoop and Solr nodes
    • -seeds: internal_IP_address of each seed node
    • listen_address: localhost_IP_address
    • auto_bootstrap: false (Add this setting only when initializing a fresh cluster with no data.)
    • Make sure that the following options are disabled, 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
      
      #auth_replication_options:
      #replication_factor: 1
      
      Note: If you have not disabled both auth_replication_strategy and replication_factor, you will see an error. For information about correcting this error, see Issues in the DataStax Enterprise 3.2.5 release notes.

    node0:

    cluster_name: 'MyDemoCluster'
    num_tokens: 256
    seed_provider:
      - class_name: org.apache.cassandra.locator.SimpleSeedProvider
        parameters:
             - seeds: "110.82.155.0,110.82.155.3"
    listen_address: 110.82.155.0

    The properties for rest of the nodes are the same as node0 except for the listen_address:

    Node listen_address
    node1 110.82.155.1
    node2 110.82.155.2
    node3 110.82.155.3
    node4 110.82.155.4
    node5 110.82.155.5
    node6 110.82.155.6
    node7 110.82.155.7
  5. 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.
  6. Check that your cluster is up and running:
    • Packaged installs: $ nodetool status
    • Tarball installs: $ install_location/bin/nodetool status

Results