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

From this document network settings
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-network.html,
I know that publish_host is the host that other nodes in the cluster will
communicate to. But I don't understand the functionality of bind_host,
which means that:

The network.bind_host setting allows to control the host different network
components will bind on. By default, the bind host will be anyLocalAddress
(typically 0.0.0.0 or ::0).

And the network.host will set network.bind_host and
network.publish_host to the same value.

So I want to know:

  1. the difference between *network.bind_host *and network.publish_host

  2. the consequences of setting network.bind_host and
    network.publish_host to different values

Thank you very much.

--
宠辱不惊,闲看庭前花开花落;去留无意,漫随天边云卷云舒。

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKLbBG_B%3DN449d3MxzqTZu3p5DMnXpg8Vy%2BBS5bcZyVD0natsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

"bind_host" is the host that an Elasticsearch node uses in the socket bind
call when starting the network. Due to socket programming model, you can
"bind" to an address. By referencing an "address", the socket allows access
to one or all underlying network devices. There are several addresses with
predefined semantics, e.g. 0.0.0.0 is reserved for "bind to all network
devices". So the "bind_host" address does not necessarily reflect a single
unique address.

"publish_host" must be a single unique network address. It is used for
connect calls by other nodes, not for socket bind call by the node itself.
By using "publish_host" all nodes and clients can be sure they can connect
to this node. Declaring this single unique address to the outside can be
interpreted as "publishing", so it is called "publish_host".

You can not set "bind_host" and "publish_host" to arbitrary values, the
values must adhere to the underlying socket model.

Jörg

On Sat, Jun 7, 2014 at 7:50 PM, flyer flyer103@gmail.com wrote:

From this document network settings
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-network.html,
I know that publish_host is the host that other nodes in the cluster
will communicate to. But I don't understand the functionality of
bind_host, which means that:

The network.bind_host setting allows to control the host different network
components will bind on. By default, the bind host will be anyLocalAddress
(typically 0.0.0.0 or ::0).

And the network.host will set network.bind_host and
network.publish_host to the same value.

So I want to know:

  1. the difference between *network.bind_host *and
    network.publish_host
  2. the consequences of setting network.bind_host and
    network.publish_host to different values

Thank you very much.

--
宠辱不惊,闲看庭前花开花落;去留无意,漫随天边云卷云舒。

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKLbBG_B%3DN449d3MxzqTZu3p5DMnXpg8Vy%2BBS5bcZyVD0natsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAKLbBG_B%3DN449d3MxzqTZu3p5DMnXpg8Vy%2BBS5bcZyVD0natsA%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGqGRzHeSFg0%2BuwxxkomdVi%3D5nx9KhGqFHcYw87Xq5pqw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Thank you, Jörg.

I neglected the client-server model and now I know the purpose of
"bind_host" and "publish_host"。

On Sun, Jun 8, 2014 at 2:27 AM, joergprante@gmail.com <joergprante@gmail.com

wrote:

"bind_host" is the host that an Elasticsearch node uses in the socket bind
call when starting the network. Due to socket programming model, you can
"bind" to an address. By referencing an "address", the socket allows access
to one or all underlying network devices. There are several addresses with
predefined semantics, e.g. 0.0.0.0 is reserved for "bind to all network
devices". So the "bind_host" address does not necessarily reflect a single
unique address.

"publish_host" must be a single unique network address. It is used for
connect calls by other nodes, not for socket bind call by the node itself.
By using "publish_host" all nodes and clients can be sure they can connect
to this node. Declaring this single unique address to the outside can be
interpreted as "publishing", so it is called "publish_host".

You can not set "bind_host" and "publish_host" to arbitrary values, the
values must adhere to the underlying socket model.

Jörg

On Sat, Jun 7, 2014 at 7:50 PM, flyer flyer103@gmail.com wrote:

From this document network settings
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/modules-network.html,
I know that publish_host is the host that other nodes in the cluster
will communicate to. But I don't understand the functionality of
bind_host, which means that:

The network.bind_host setting allows to control the host different
network components will bind on. By default, the bind host will be
anyLocalAddress (typically 0.0.0.0 or ::0).

And the network.host will set network.bind_host and
network.publish_host to the same value.

So I want to know:

  1. the difference between *network.bind_host *and
    network.publish_host
  2. the consequences of setting network.bind_host and
    network.publish_host to different values

Thank you very much.

--
宠辱不惊,闲看庭前花开花落;去留无意,漫随天边云卷云舒。

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKLbBG_B%3DN449d3MxzqTZu3p5DMnXpg8Vy%2BBS5bcZyVD0natsA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAKLbBG_B%3DN449d3MxzqTZu3p5DMnXpg8Vy%2BBS5bcZyVD0natsA%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGqGRzHeSFg0%2BuwxxkomdVi%3D5nx9KhGqFHcYw87Xq5pqw%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAKdsXoGqGRzHeSFg0%2BuwxxkomdVi%3D5nx9KhGqFHcYw87Xq5pqw%40mail.gmail.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
宠辱不惊,闲看庭前花开花落;去留无意,漫随天边云卷云舒。

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAKLbBG_KrYccT39fjtpb7tuUswTfUrvZ31RgnPHXouMDymBeXg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.