From 3dda271bf5328639c70e06780c5aa4429ee4a013 Mon Sep 17 00:00:00 2001 From: Tim Brooks Date: Thu, 20 Dec 2018 16:41:21 -0700 Subject: [PATCH] Update transport docs and settings for changes (#36913) 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. Additionally it adds a missing remote compress setting to the docs. --- docs/reference/modules/discovery/zen.asciidoc | 2 +- docs/reference/modules/network.asciidoc | 2 +- .../modules/remote-clusters.asciidoc | 8 +++++ docs/reference/modules/transport.asciidoc | 32 +++++++++---------- .../settings/audit-settings.asciidoc | 4 +-- .../discovery-settings.asciidoc | 2 +- .../single/SingleNodeDiscoveryIT.java | 2 +- .../AbstractSimpleTransportTestCase.java | 24 +++++++------- .../auditing/forwarding-logs.asciidoc | 2 +- 9 files changed, 43 insertions(+), 35 deletions(-) diff --git a/docs/reference/modules/discovery/zen.asciidoc b/docs/reference/modules/discovery/zen.asciidoc index e9be7aa52e890..98967bf7ebaf4 100644 --- a/docs/reference/modules/discovery/zen.asciidoc +++ b/docs/reference/modules/discovery/zen.asciidoc @@ -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 diff --git a/docs/reference/modules/network.asciidoc b/docs/reference/modules/network.asciidoc index cbe0b4a9b96b8..2b4f582d47ac1 100644 --- a/docs/reference/modules/network.asciidoc +++ b/docs/reference/modules/network.asciidoc @@ -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 diff --git a/docs/reference/modules/remote-clusters.asciidoc b/docs/reference/modules/remote-clusters.asciidoc index 4bf3073abd359..768eb7d6117bf 100644 --- a/docs/reference/modules/remote-clusters.asciidoc +++ b/docs/reference/modules/remote-clusters.asciidoc @@ -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 diff --git a/docs/reference/modules/transport.asciidoc b/docs/reference/modules/transport.asciidoc index c1bc83230e597..bc9a4fb544d67 100644 --- a/docs/reference/modules/transport.asciidoc +++ b/docs/reference/modules/transport.asciidoc @@ -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`. @@ -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 @@ -57,7 +57,7 @@ It also uses the common <>. [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 @@ -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 @@ -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. diff --git a/docs/reference/settings/audit-settings.asciidoc b/docs/reference/settings/audit-settings.asciidoc index e3c5c6682927f..d551516984052 100644 --- a/docs/reference/settings/audit-settings.asciidoc +++ b/docs/reference/settings/audit-settings.asciidoc @@ -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 -<> setting, you can omit the -`port` value. Otherwise, it must match the `transport.tcp.port` setting. +<> 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. diff --git a/docs/reference/setup/important-settings/discovery-settings.asciidoc b/docs/reference/setup/important-settings/discovery-settings.asciidoc index e0c67ffb22da8..0587484f50c61 100644 --- a/docs/reference/setup/important-settings/discovery-settings.asciidoc +++ b/docs/reference/setup/important-settings/discovery-settings.asciidoc @@ -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. diff --git a/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java b/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java index e3e7905f43150..89d45bb09b90a 100644 --- a/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java +++ b/server/src/test/java/org/elasticsearch/discovery/single/SingleNodeDiscoveryIT.java @@ -129,7 +129,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(); } diff --git a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java index c817cf41f46db..815f5bda848ec 100644 --- a/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/transport/AbstractSimpleTransportTestCase.java @@ -2602,34 +2602,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") @@ -2638,11 +2638,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") diff --git a/x-pack/docs/en/security/auditing/forwarding-logs.asciidoc b/x-pack/docs/en/security/auditing/forwarding-logs.asciidoc index 0b79af593b6ea..f08945a6f8a0d 100644 --- a/x-pack/docs/en/security/auditing/forwarding-logs.asciidoc +++ b/x-pack/docs/en/security/auditing/forwarding-logs.asciidoc @@ -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