Use cases for listen address
Correct cassandra.yaml
listen_address settings for various use cases.
|
-
Single-node installations: do one of the following:
-
Comment out the listen_address property. If the node is properly configured (host name, name resolution, and so on), the database uses InetAddress.getLocalHost() to get the local address from the system.
-
Leave the default setting,
localhost
.
-
-
Node in a multi-node installations: set the
listen_address
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 cluster deployed across multiple Amazon EC2 regions using the Ec2MultiRegionSnitch:
-
Set
listen_address
to this node’s private IP or hostname, or set listen_interface (for communication within the local datacenter). -
Set broadcast_address to the second IP or hostname (for communication between datacenters).
-
Set listen_on_broadcast_address to
true
. -
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.