When does client need cluster.name?


(Jacobg) #1

The documentation for transport client says to specify cluster.name setting, but the rest client does not. When is cluster.name needed, and what is it used for? Is it for sniffing nodes?

Thanks.


(Fram Souza) #2

Hi @jacobg

A cluster.name is the property to set the name of your cluster. Default name of your cluster is elasticsearch. You can change it to any name you want.

If you remove cluster.name , it won't affect your program. Default name would be taken.

Remember! All nodes need have a same name in the cluster.name, and is not needed REST Client.


(David Pilato) #3

The cluster name is not needed by the REST Client.


(Jacobg) #4

Thanks for the reply @Fram_Souza and @dadoonet. I understand cluster name's purpose from the node's perspective. My question is from the client's perspective. I'm presuming that a host:port configuration will be for a single cluster. So if it's not needed for REST client, why is needed for Transport client?


(David Pilato) #5

It was not mandatory for transport client either as you could skip it with the ignore cluster name setting.

But if the later is not set, then the transport client is only connecting to clusters matching the same cluster name.


(Jacobg) #6

Ok I see. Thanks @dadoonet!


(system) #7

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.