Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between broadcast_address and broadcast_rpc_address in cassandra.yaml?

GOAL: I am trying to understand the best way to configure my Cassandra cluster so that several different drivers across several different networking scenarios can communicate with it properly.

PROBLEM/QUESTION: It is not entirely clear to me, after reading the documentation what the difference is between these two settings: broadcast_address and broadcast_rpc_address as it pertains to the way that a driver connects and interacts with the cluster. Which one or which combination of these settings should I use with my node's accessible network endpoint (DNS record attainable by the client's/drivers)?

Here is the documentation for broadcast_address from datastax: (Default: listen_address)note The IP address a node tells other nodes in the cluster to contact it by. It allows public and private address to be different. For example, use the broadcast_address parameter in topologies where not all nodes have access to other nodes by their private IP addresses. If your Cassandra cluster is deployed across multiple Amazon EC2 regions and you use the EC2MultiRegionSnitch, set the broadcast_address to public IP address of the node and the listen_address to the private IP.

Here is the documentation for broadcast_rpc_address from datastax: (Default: unset)note RPC address to broadcast to drivers and other Cassandra nodes. This cannot be set to 0.0.0.0. If blank, it is set to the value of the rpc_address or rpc_interface. If rpc_address or rpc_interfaceis set to 0.0.0.0, this property must be set.

EDIT: This question pertains to Cassandra version 2.1, and may not be relevant in the future.

like image 341
ctlacko Avatar asked Jun 03 '15 18:06

ctlacko


People also ask

What is Cassandra Broadcast_address?

broadcast_address. (Default: listen_address) noteThe "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 .

What is Cassandra yaml file?

The cassandra. yaml file is the main configuration file for Cassandra. Only the properties that require specific values are covered here. For complete information about all the properties and values, see the Cassandra documentation. Important: After changing properties in the cassandra.

What is Cassandra port number?

What ports does Cassandra use? By default, Cassandra uses 7000 for cluster communication (7001 if SSL is enabled), 9042 for native protocol clients, and 7199 for JMX.

Where is Cassandra yaml file located?

The configuration files of Cassandra are located in the /etc/cassandra directory. cassandra. yaml is the file that contains most of the Cassandra configuration, such as ports used, file locations and seed node IP addresses.


1 Answers

One of the users of #cassandra on freenode was kind enough to provide an answer to this question:

The rpc family of settings pertain to drivers that use the Thrift protocol to communicate with cassandra. For those drivers that use the native transport, the broadcast_address will be reported and used.

My test case confirms this.

like image 105
ctlacko Avatar answered Sep 30 '22 21:09

ctlacko