Configuring gossip settings

When a node first starts up, it looks at its cassandra.yaml configuration file to determine the name of the cluster it belongs to; which nodes (called seeds) to contact to obtain information about the other nodes in the cluster; and other parameters for determining port and range information.

Procedure

Where is the cassandra.yaml file?

The location of the cassandra.yaml file depends on the type of installation:

Installation Type Location

Package installations + Installer-Services installations

/etc/dse/cassandra/cassandra.yaml

Tarball installations + Installer-No Services installations

<installation_location>/resources/cassandra/conf/cassandra.yaml

In the cassandra.yaml file, set the following parameters:

Property Description

cluster_name

Name of the cluster that this node is joining. Must be the same for every node in the cluster.

listen_address

The IP address or hostname that the database binds to for connecting this node to other nodes.

listen_interface

Use this option instead of listen_address to specify the network interface by name, rather than address/hostname

(Optional) broadcast_address

The public IP address this node uses to broadcast to other nodes outside the network or across regions in multiple-region EC2 deployments. If this property is commented out, the node uses the same IP address or hostname as listen_address. A node does not need a separate broadcast_address in a single-node or single-datacenter installation, or in an EC2-based network that supports automatic switching between private and public communication. It is necessary to set a separate listen_address and broadcast_address on a node with multiple physical network interfaces or other topologies where not all nodes have access to other nodes by their private IP addresses. For specific configurations, see the instructions for listen_address. The default is the listen_address.

seed_provider

A -seeds list is comma-delimited list of hosts (IP addresses) that gossip uses to learn the topology of the ring. Every node should have the same list of seeds.

Making every node a seed node is not recommended because of increased maintenance and reduced gossip performance. Gossip optimization is not critical, but it is recommended to use a small seed list (approximately three nodes per datacenter).

storage_port

The inter-node communication port (default is 7000). Must be the same for every node in the cluster.

initial_token

For legacy clusters. Set this property for single-node-per-token architecture, in which a node owns exactly one contiguous range in the ring space.

num_tokens

For new clusters. The number of tokens randomly assigned to this node in a cluster that uses virtual nodes (vnodes).

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

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.

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