Quick start properties

The minimal properties needed for configuring a cluster.

Related information: Initializing a multiple node cluster (single datacenter) and Initializing a multiple node cluster (multiple datacenters).

cluster_name

(Default: Test Cluster)

The name of the cluster. This setting prevents nodes in one logical cluster from joining another. All nodes in a cluster must have the same value.

listen_address

(Default: localhost)

The IP address or hostname that Cassandra binds to for connecting this node to other nodes. Set this parameter or listen_interface, not both.

Correct settings for various use cases:

  • Single-node installations: do one of the following:
    • Comment this property out. If the node is properly configured (host name, name resolution, and so on.), Cassandra uses InetAddress.getLocalHost() to get the local address from the system.
    • Leave set to the default, localhost.
  • Node in a multi-node installations: set this property to the node's IP address or hostname, or set listen_interface.
  • Node in a multi-network or multi-Datacenter installation, within an EC2 environment that supports automatic switching between public and private interfaces: set listen_address to the node's IP address or hostname, or set listen_interface.
  • Node with two physical network interfaces in a multi-datacenter installation or a Cassandra cluster deployed across multiple Amazon EC2 regions using the Ec2MultiRegionSnitch:
    1. Set listen_address to this node's private IP or hostname, or set listen_interface (for communication within the local datacenter).
    2. Set broadcast_address to the second IP or hostname (for communication between datacenters).
    3. Set listen_on_broadcast_address to true.
    4. If this node is a seed node, add the node's public IP address or hostname to the seeds list.
  • Open the storage_port or ssl_storage_port on the public IP firewall.

WARNING:

  • Never set listen_address to 0.0.0.0. It is always wrong.
  • Do not set values for both listen_address and listen_interface on the same node.

listen_interface

(Default: eth0)note

The interface that Cassandra binds to for connecting to other Cassandra nodes. Interfaces must correspond to a single address — IP aliasing is not supported. Do not set values for both listen_address and listen_interface on the same node.

listen_interface_prefer_ipv6

(Default: false)

If an interface has an ipv4 and an ipv6 address, Cassandra uses the first ipv4 address by default. Set this property to true to configure Cassandra to use the first ipv6 address.

Default directories

If you have changed any of the default directories during installation, set these properties to the new locations. Make sure you have root access.

cdc_raw_directory

The directory where the Change Data Capture logs are stored.

Default locations:

  • DataStax Enterprise 5.0 Installer-Services and package installations: /var/lib/cassandra/cdc_raw
  • DataStax Enterprise 5.0 Installer-No Services and tarball installations: /var/lib/cassandra/cdc_raw
  • Cassandra package installations: /var/lib/cassandra/cdc_raw
  • Cassandra tarball installations: install_location/data/cdc_raw

commitlog_directory

The directory where the commit log is stored.

Default locations:

  • DataStax Enterprise 5.0 Installer-Services and package installations: /var/lib/cassandra/commitlog
  • DataStax Enterprise 5.0 Installer-No Services and tarball installations: /var/lib/cassandra/commitlog
  • Cassandra package installations: /var/lib/cassandra/commitlog
  • Cassandra tarball installations: install_location/data/commitlog

For optimal write performance, place the commit log be on a separate disk partition, or (ideally) a separate physical device from the data file directories. Because the commit log is append only, an HDD is acceptable for this purpose.

data_file_directories

The directory location where table data is stored (in SSTables). Cassandra distributes data evenly across the location, subject to the granularity of the configured compaction strategy.

Default locations:

  • DataStax Enterprise 5.0 Installer-Services and package installations: /var/lib/cassandra/data
  • DataStax Enterprise 5.0 Installer-No Services and tarball installations: /var/lib/cassandra/data
  • Cassandra package installations: /var/lib/cassandra/data
  • Cassandra tarball installations: install_location/data/data

As a production best practice, use RAID 0 and SSDs.

saved_caches_directory

The directory location where table key and row caches are stored.

Default location:

  • DataStax Enterprise 5.0 Installer-Services and package installations: /var/lib/cassandra/saved_caches
  • DataStax Enterprise 5.0 Installer-No Services and tarball installations: /var/lib/cassandra/saved_caches
  • Cassandra package installations: /var/lib/cassandra/saved_caches
  • Cassandra tarball installations: install_location/data/saved_caches

results matching ""

    No results matching ""