What's the difference between bind_host and publish_host in ElasticSearch?

后端 未结 5 1561
孤城傲影
孤城傲影 2021-01-31 09:53

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

5条回答
  •  孤独总比滥情好
    2021-01-31 10:18

    The bind_host setting controls what network interface Elasticsearch listens on. So on a machine that has multiple NICs this will allow you to control which one ES will bind to. The default of 0.0.0.0 basically means "bind to all".

    The publish_host setting controls what IP address Elasticsearch announces to other members. This has to be an actual IP address and is what the other cluster members will use to communicate with the ES node.

    You can set bind_host and publish_host to different values if you need to do something special on a multi-homed server. Most use cases won't need to though, hence the network.host setting controlling both.

提交回复
热议问题