Skip to content

Commit

Permalink
Update transport docs and settings for changes (#36786)
Browse files Browse the repository at this point in the history
This is related to #36652. In 7.0 we plan to deprecate a number of
settings that make reference to the concept of a tcp transport. We
mostly just have a single transport type now (based on tcp). Settings
should only reference tcp if they are referring to socket options. This
commit updates the settings in the docs. And removes string usages of
the old settings. Additionally it adds a missing remote compress setting
to the docs.
  • Loading branch information
Tim-Brooks authored Dec 18, 2018
1 parent 10f6408 commit 47a9a8d
Show file tree
Hide file tree
Showing 14 changed files with 50 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class ClusterFormationTasks {
}
esConfig['node.max_local_storage_nodes'] = node.config.numNodes
esConfig['http.port'] = node.config.httpPort
esConfig['transport.tcp.port'] = node.config.transportPort
esConfig['transport.port'] = node.config.transportPort
// Default the watermarks to absurdly low to prevent the tests from failing on nodes without enough disk space
esConfig['cluster.routing.allocation.disk.watermark.low'] = '1b'
esConfig['cluster.routing.allocation.disk.watermark.high'] = '1b'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ private void configure() {
config.put("node.attr.testattr", "test");
config.put("node.portsfile", "true");
config.put("http.port", "0");
config.put("transport.tcp.port", "0");
config.put("transport.port", "0");
// Default the watermarks to absurdly low to prevent the tests from failing on nodes without enough disk space
config.put("cluster.routing.allocation.disk.watermark.low", "1b");
config.put("cluster.routing.allocation.disk.watermark.high", "1b");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ node${attr}.dummy: everyone_has_me
node${attr}.number: ${node:1}
node${attr}.array: [${node:0:1}, ${node:1}]
http.port: ${http_port}
transport.tcp.port: ${transport_port}
transport.port: ${transport_port}
discovery.zen.minimum_master_nodes: 3
discovery.zen.ping.unicast.hosts: ['localhost:9300','localhost:9301','localhost:9302']
__ES_YML
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/modules/discovery/zen.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ The list of hosts is set using the `discovery.zen.ping.unicast.hosts` static
setting. This is either an array of hosts or a comma-delimited string. Each
value should be in the form of `host:port` or `host` (where `port` defaults to
the setting `transport.profiles.default.port` falling back to
`transport.tcp.port` if not set). Note that IPv6 hosts must be bracketed. The
`transport.port` if not set). Note that IPv6 hosts must be bracketed. The
default for this setting is `127.0.0.1, [::1]`

Additionally, the `discovery.zen.ping.unicast.resolve_timeout` configures the
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/modules/network.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ range.
+
Defaults to `9200-9300`.

`transport.tcp.port`::
`transport.port`::

Port to bind for communication between nodes. Accepts a single value or a
range. If a range is specified, the node will bind to the first available port
Expand Down
8 changes: 8 additions & 0 deletions docs/reference/modules/remote-clusters.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ PUT _cluster/settings
are sent according to the global `transport.ping_schedule` setting, which
defaults to ``-1` meaning that pings are not sent.

`cluster.remote.${cluster_alias}.transport.compress`::

Per cluster boolean setting that enables you to configure compression for
requests to a specific remote cluster. This setting impacts only requests
sent to the remote cluster. If the inbound request is compressed,
Elasticsearch compresses the response. If unset, the global
`transport.compress` is used as the fallback setting.

[float]
[[retrieve-remote-clusters-info]]
=== Retrieving remote clusters info
Expand Down
32 changes: 16 additions & 16 deletions docs/reference/modules/transport.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,21 @@ being the ideal solution for scatter (broadcast) / gather operations such
as search in Elasticsearch.

[float]
=== TCP Transport
=== Transport Settings

The TCP transport is an implementation of the transport module using
TCP. It allows for the following settings:
The internal transport communicates over TCP. You can configure it with the
following settings:

[cols="<,<",options="header",]
|=======================================================================
|Setting |Description
|`transport.tcp.port` |A bind port range. Defaults to `9300-9400`.
|`transport.port` |A bind port range. Defaults to `9300-9400`.

|`transport.publish_port` |The port that other nodes in the cluster
should use when communicating with this node. Useful when a cluster node
is behind a proxy or firewall and the `transport.tcp.port` is not directly
is behind a proxy or firewall and the `transport.port` is not directly
addressable from the outside. Defaults to the actual port assigned via
`transport.tcp.port`.
`transport.port`.

|`transport.bind_host` |The host address to bind the transport service to. Defaults to `transport.host` (if set) or `network.bind_host`.

Expand All @@ -38,11 +38,11 @@ addressable from the outside. Defaults to the actual port assigned via
|`transport.host` |Used to set the `transport.bind_host` and the `transport.publish_host` Defaults to `transport.host` or `network.host`.


|`transport.tcp.connect_timeout` |The socket connect timeout setting (in
|`transport.connect_timeout` |The connect timeout for initiating a new connection (in
time setting format). Defaults to `30s`.

|`transport.tcp.compress` |Set to `true` to enable compression (`DEFLATE`)
between all nodes. Defaults to `false`.
|`transport.compress` |Set to `true` to enable compression (`DEFLATE`) between
all nodes. Defaults to `false`.

|`transport.ping_schedule` | Schedule a regular application-level ping message
to ensure that transport connections between nodes are kept alive. Defaults to
Expand All @@ -57,7 +57,7 @@ It also uses the common
<<modules-network,network settings>>.

[float]
==== TCP Transport Profiles
==== Transport Profiles

Elasticsearch allows you to bind to multiple ports on different interfaces by
the use of transport profiles. See this example configuration
Expand All @@ -82,11 +82,11 @@ example above:
* `port`: The port to bind to
* `bind_host`: The host to bind
* `publish_host`: The host which is published in informational APIs
* `tcp_no_delay`: Configures the `TCP_NO_DELAY` option for this socket
* `tcp_keep_alive`: Configures the `SO_KEEPALIVE` option for this socket
* `reuse_address`: Configures the `SO_REUSEADDR` option for this socket
* `tcp_send_buffer_size`: Configures the send buffer size of the socket
* `tcp_receive_buffer_size`: Configures the receive buffer size of the socket
* `tcp.no_delay`: Configures the `TCP_NO_DELAY` option for this socket
* `tcp.keep_alive`: Configures the `SO_KEEPALIVE` option for this socket
* `tcp.reuse_address`: Configures the `SO_REUSEADDR` option for this socket
* `tcp.send_buffer_size`: Configures the send buffer size of the socket
* `tcp.receive_buffer_size`: Configures the receive buffer size of the socket

[float]
==== Long-lived idle connections
Expand All @@ -97,7 +97,7 @@ period of time. Nonetheless, Elasticsearch requires these connections to remain
open, and it can disrupt the operation of the cluster if any inter-node
connections are closed by an external influence such as a firewall. It is
important to configure your network to preserve long-lived idle connections
between Elasticsearch nodes, for instance by leaving `tcp_keep_alive` enabled
between Elasticsearch nodes, for instance by leaving `tcp.keep_alive` enabled
and ensuring that the keepalive interval is shorter than any timeout that might
cause idle connections to be closed, or by setting `transport.ping_schedule` if
keepalives cannot be configured.
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/settings/audit-settings.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ To index audit events to a remote {es} cluster, you configure the following
`xpack.security.audit.index.client.hosts`::
Specifies a comma-separated list of `host:port` pairs. These hosts should be
nodes in the remote cluster. If you are using default values for the
<<common-network-settings,`transport.tcp.port`>> setting, you can omit the
`port` value. Otherwise, it must match the `transport.tcp.port` setting.
<<common-network-settings,`transport.port`>> setting, you can omit the
`port` value. Otherwise, it must match the `transport.port` setting.

`xpack.security.audit.index.client.cluster.name`::
Specifies the name of the remote cluster.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ discovery.zen.ping.unicast.hosts:
- seeds.mydomain.com <2>
--------------------------------------------------
<1> The port will default to `transport.profiles.default.port` and fallback to
`transport.tcp.port` if not specified.
`transport.port` if not specified.
<2> A hostname that resolves to multiple IP addresses will try all resolved
addresses.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected Settings nodeSettings(int nodeOrdinal) {
.builder()
.put(super.nodeSettings(nodeOrdinal))
.put("discovery.type", "single-node")
.put("transport.tcp.port", "0")
.put("transport.port", "0")
.build();
}

Expand Down Expand Up @@ -130,7 +130,7 @@ public Settings nodeSettings(int nodeOrdinal) {
* We align the port ranges of the two as then with zen discovery these two
* nodes would find each other.
*/
.put("transport.tcp.port", port + "-" + (port + 5 - 1))
.put("transport.port", port + "-" + (port + 5 - 1))
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public static void main(String[] args) throws IOException {
Path bin = esDir.resolve("bin").resolve("elasticsearch" + (Constants.WINDOWS ? ".bat" : ""));
Path config = esDir.resolve("config").resolve("elasticsearch.yml");

Files.write(config, Arrays.asList("http.port: 0", "transport.tcp.port: 0", "network.host: 127.0.0.1"), StandardCharsets.UTF_8);
Files.write(config, Arrays.asList("http.port: 0", "transport.port: 0", "network.host: 127.0.0.1"), StandardCharsets.UTF_8);

List<String> command = new ArrayList<>();
command.add(bin.toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2603,34 +2603,34 @@ public void testProfileSettings() {
.build();

Settings transportSettings = Settings.builder()
.put("transport.tcp_no_delay", enable)
.put("transport.tcp.no_delay", enable)
.put("transport.tcp.keep_alive", enable)
.put("transport.tcp.reuse_address", enable)
.put("transport.tcp.send_buffer_size", "43000b")
.put("transport.tcp.receive_buffer_size", "42000b")
.put("transport.publish_host", "the_publish_host")
.put("transport.tcp.port", "9700-9800")
.put("transport.port", "9700-9800")
.put("transport.bind_host", "the_bind_host")
.put(globalSettings2)
.build();

Settings transportSettings2 = Settings.builder()
.put("transport.tcp_no_delay", !enable)
.put("transport.tcp.no_delay", !enable)
.put("transport.tcp.keep_alive", !enable)
.put("transport.tcp.reuse_address", !enable)
.put("transport.tcp.send_buffer_size", "5b")
.put("transport.tcp.receive_buffer_size", "6b")
.put("transport.publish_host", "another_publish_host")
.put("transport.tcp.port", "9702-9802")
.put("transport.port", "9702-9802")
.put("transport.bind_host", "another_bind_host")
.put(globalSettings2)
.build();
Settings defaultProfileSettings = Settings.builder()
.put("transport.profiles.default.tcp_no_delay", enable)
.put("transport.profiles.default.tcp_keep_alive", enable)
.put("transport.profiles.default.tcp.no_delay", enable)
.put("transport.profiles.default.tcp.keep_alive", enable)
.put("transport.profiles.default.reuse_address", enable)
.put("transport.profiles.default.send_buffer_size", "43000b")
.put("transport.profiles.default.receive_buffer_size", "42000b")
.put("transport.profiles.default.tcp.send_buffer_size", "43000b")
.put("transport.profiles.default.tcp.receive_buffer_size", "42000b")
.put("transport.profiles.default.port", "9700-9800")
.put("transport.profiles.default.publish_host", "the_publish_host")
.put("transport.profiles.default.bind_host", "the_bind_host")
Expand All @@ -2639,11 +2639,11 @@ public void testProfileSettings() {
.build();

Settings profileSettings = Settings.builder()
.put("transport.profiles.some_profile.tcp_no_delay", enable)
.put("transport.profiles.some_profile.tcp_keep_alive", enable)
.put("transport.profiles.some_profile.tcp.no_delay", enable)
.put("transport.profiles.some_profile.tcp.keep_alive", enable)
.put("transport.profiles.some_profile.reuse_address", enable)
.put("transport.profiles.some_profile.send_buffer_size", "43000b")
.put("transport.profiles.some_profile.receive_buffer_size", "42000b")
.put("transport.profiles.some_profile.tcp.send_buffer_size", "43000b")
.put("transport.profiles.some_profile.tcp.receive_buffer_size", "42000b")
.put("transport.profiles.some_profile.port", "9700-9800")
.put("transport.profiles.some_profile.publish_host", "the_publish_host")
.put("transport.profiles.some_profile.bind_host", "the_bind_host")
Expand Down
2 changes: 1 addition & 1 deletion x-pack/docs/en/security/auditing/forwarding-logs.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ xpack.security.audit.index.client.cluster.name: logging-prod <2>
xpack.security.audit.index.client.xpack.security.user: myuser:mypassword <3>
--------------------------------------------------
<1> A list of hosts in the remote cluster. If you are not using the default
value for the `transport.tcp.port` setting on the remote cluster, you must
value for the `transport.port` setting on the remote cluster, you must
specify the appropriate port number (prefixed by a colon) after each host.
<2> The remote cluster name.
<3> A valid user and password, which must have authority to create the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ xpack.ssl.certificate: $ESCONFIG/certs/node-master/node-master.crt
xpack.ssl.certificate_authorities: ["$ESCONFIG/certs/ca/ca.crt"]
xpack.security.transport.ssl.enabled: true
transport.tcp.port: 9300
transport.port: 9300
xpack.security.http.ssl.enabled: true
http.port: 9200
Expand Down Expand Up @@ -339,7 +339,7 @@ xpack.ssl.certificate: $ESCONFIG/certs/node-data/node-data.crt
xpack.ssl.certificate_authorities: ["$ESCONFIG/certs/ca/ca.crt"]
xpack.security.transport.ssl.enabled: true
transport.tcp.port: 9301
transport.port: 9301
xpack.security.http.ssl.enabled: true
http.port: 9201
Expand Down

0 comments on commit 47a9a8d

Please sign in to comment.