From this document network settings, I know that publish_host is the host that other nodes in the cluster will communicate to. But I don\'t understand the funct
It is possible to set them to different values and really useful in some cases. Here is my usage:
I have a local network in a data center where I run the elasticsearch cluster composed of different nodes. This means that every elasticsearch machine has two ip addresses, one to reach it from an external machine and the other to connect locally to other machines in the same network.
The internal ip (eth1) is used to let different nodes of elasticsearch communicate, discover, etc. each other and the external ip address (eth0) is the one which my web application, which is in another network, makes the requests to.
So in simple words, bind_host (both ip in my case, the same as default value 0.0.0.0 that attaches all interfaces) is where elasticsearch listens and publish_host (internal ip in my case) is where elasticsearch communicates with other cluster components.
This way, my web application being in another network, can access the ES cluster from the bind_host address, while elasticsearch communicates with the cluster with the publish_host.