Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

anubhuti.lucky_27186 avatar image
anubhuti.lucky_27186 asked ·

What is the difference between listen_address and broadcast_address?

Difference between broadcast address and listen address ? And when to use broadcast adress

cassandra
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Erick Ramirez avatar image
Erick Ramirez answered ·

@anubhuti.lucky_27186 The listen_address is what Cassandra binds to so nodes can connect to each other. This is usually set to a private IP that nodes use for inter-node communication.

If nodes are not able to communicate with each other on the private IP (usually because they are in different DCs/network subnets), the broadcast_address should be set to the public IP. This is typically used in clusters deployed in multi-region public clouds where nodes can only communicate with other local nodes on the private network and need to use the public network to talk to remote nodes.

Note that you do not need to set the broadcast_address if all nodes can talk to each other on the same network. If left unset, it uses the same IP as the listen_address. Cheers!

Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.