transport.asciidoc 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. [[transport-settings]]
  2. ==== Advanced transport settings
  3. Use the following advanced settings to configure the transport interface
  4. independently of the <<http-settings,HTTP interface>>. Use the
  5. <<common-network-settings,network
  6. settings>> to configure both interfaces together.
  7. `transport.host`::
  8. (<<static-cluster-setting,Static>>)
  9. Sets the address of this node for transport traffic. The node will bind to this
  10. address and will also use it as its transport publish address. Accepts an IP
  11. address, a hostname, or a <<network-interface-values,special value>>.
  12. Use this setting only if you require different configurations for the
  13. transport and HTTP interfaces.
  14. +
  15. Defaults to the address given by `network.host`.
  16. `transport.bind_host`::
  17. (<<static-cluster-setting,Static>>)
  18. The network address(es) to which the node should bind in order to listen for
  19. incoming transport connections. Accepts a list of IP addresses, hostnames, and
  20. <<network-interface-values,special values>>. Defaults to the address given by
  21. `transport.host` or `network.bind_host`. Use this setting only if you require
  22. to bind to multiple addresses or to use different addresses for publishing and
  23. binding, and you also require different binding configurations for the
  24. transport and HTTP interfaces.
  25. `transport.publish_host`::
  26. (<<static-cluster-setting,Static>>)
  27. The network address at which the node can be contacted by other nodes. Accepts
  28. an IP address, a hostname, or a <<network-interface-values,special value>>.
  29. Defaults to the address given by `transport.host` or `network.publish_host`.
  30. Use this setting only if you require to bind to multiple addresses or to use
  31. different addresses for publishing and binding, and you also require different
  32. binding configurations for the transport and HTTP interfaces.
  33. `transport.publish_port`::
  34. (<<static-cluster-setting,Static>>)
  35. The port of the <<modules-network-binding-publishing,transport publish
  36. address>>. Set this parameter only if you need the publish port to be
  37. different from `transport.port`. Defaults to the port assigned via
  38. `transport.port`.
  39. `transport.connect_timeout`::
  40. (<<static-cluster-setting,Static>>)
  41. The connect timeout for initiating a new connection (in
  42. time setting format). Defaults to `30s`.
  43. `transport.compress`::
  44. (<<static-cluster-setting,Static>>)
  45. Set to `true`, `indexing_data`, or `false` to configure transport compression
  46. between nodes. The option `true` will compress all data. The option
  47. `indexing_data` will compress only the raw index data sent between nodes during
  48. ingest, ccr following (excluding bootstrap), and operations based shard recovery
  49. (excluding transferring lucene files). Defaults to `indexing_data`.
  50. `transport.compression_scheme`::
  51. (<<static-cluster-setting,Static>>)
  52. Configures the compression scheme for `transport.compress`. The options are
  53. `deflate` or `lz4`. If `lz4` is configured and the remote node has not been
  54. upgraded to a version supporting `lz4`, the traffic will be sent uncompressed.
  55. Defaults to `lz4`.
  56. `transport.ping_schedule`::
  57. (<<static-cluster-setting,Static>>)
  58. Schedule a regular application-level ping message
  59. to ensure that transport connections between nodes are kept alive. Defaults to
  60. `5s` in the transport client and `-1` (disabled) elsewhere. It is preferable
  61. to correctly configure TCP keep-alives instead of using this feature, because
  62. TCP keep-alives apply to all kinds of long-lived connections and not just to
  63. transport connections.
  64. `transport.tcp.no_delay`::
  65. (<<static-cluster-setting,Static>>)
  66. Enable or disable the {wikipedia}/Nagle%27s_algorithm[TCP no delay]
  67. setting. Defaults to `network.tcp.no_delay`.
  68. `transport.tcp.keep_alive`::
  69. (<<static-cluster-setting,Static>>)
  70. Configures the `SO_KEEPALIVE` option for this socket, which
  71. determines whether it sends TCP keepalive probes.
  72. Defaults to `network.tcp.keep_alive`.
  73. `transport.tcp.keep_idle`::
  74. (<<static-cluster-setting,Static>>)
  75. Configures the `TCP_KEEPIDLE` option for this socket, which
  76. determines the time in seconds that a connection must be idle before
  77. starting to send TCP keepalive probes. Defaults to `network.tcp.keep_idle` if set,
  78. or the system default otherwise.
  79. This value cannot exceed `300` seconds. In cases where the system default
  80. is higher than `300`, the value is automatically lowered to `300`. Only applicable on
  81. Linux and macOS, and requires Java 11 or newer.
  82. `transport.tcp.keep_interval`::
  83. (<<static-cluster-setting,Static>>)
  84. Configures the `TCP_KEEPINTVL` option for this socket,
  85. which determines the time in seconds between sending TCP keepalive probes.
  86. Defaults to `network.tcp.keep_interval` if set, or the system default otherwise.
  87. This value cannot exceed `300` seconds. In cases where the system default is higher than `300`,
  88. the value is automatically lowered to `300`. Only applicable on Linux and macOS,
  89. and requires Java 11 or newer.
  90. `transport.tcp.keep_count`::
  91. (<<static-cluster-setting,Static>>)
  92. Configures the `TCP_KEEPCNT` option for this socket, which
  93. determines the number of unacknowledged TCP keepalive probes that may be
  94. sent on a connection before it is dropped. Defaults to `network.tcp.keep_count`
  95. if set, or the system default otherwise. Only applicable on Linux and macOS, and
  96. requires Java 11 or newer.
  97. `transport.tcp.reuse_address`::
  98. (<<static-cluster-setting,Static>>)
  99. Should an address be reused or not. Defaults to `network.tcp.reuse_address`.
  100. `transport.tcp.send_buffer_size`::
  101. (<<static-cluster-setting,Static>>)
  102. The size of the TCP send buffer (specified with <<size-units,size units>>).
  103. Defaults to `network.tcp.send_buffer_size`.
  104. `transport.tcp.receive_buffer_size`::
  105. (<<static-cluster-setting,Static>>)
  106. The size of the TCP receive buffer (specified with <<size-units,size units>>).
  107. Defaults to `network.tcp.receive_buffer_size`.
  108. [[transport-profiles]]
  109. ===== Transport profiles
  110. Elasticsearch allows you to bind to multiple ports on different interfaces by
  111. the use of transport profiles. See this example configuration
  112. [source,yaml]
  113. --------------
  114. transport.profiles.default.port: 9300-9400
  115. transport.profiles.default.bind_host: 10.0.0.1
  116. transport.profiles.client.port: 9500-9600
  117. transport.profiles.client.bind_host: 192.168.0.1
  118. transport.profiles.dmz.port: 9700-9800
  119. transport.profiles.dmz.bind_host: 172.16.1.2
  120. --------------
  121. The `default` profile is special. It is used as a fallback for any other
  122. profiles, if those do not have a specific configuration setting set, and is how
  123. this node connects to other nodes in the cluster.
  124. Other profiles can have any name and can be used to set up specific endpoints
  125. for incoming connections.
  126. The following parameters can be configured on each transport profile, as in the
  127. example above:
  128. * `port`: The port to which to bind.
  129. * `bind_host`: The host to which to bind.
  130. * `publish_host`: The host which is published in informational APIs.
  131. Profiles also support all the other transport settings specified in the
  132. <<transport-settings,transport settings>> section, and use these as defaults.
  133. For example, `transport.profiles.client.tcp.reuse_address` can be explicitly
  134. configured, and defaults otherwise to `transport.tcp.reuse_address`.
  135. [[long-lived-connections]]
  136. ===== Long-lived idle connections
  137. A transport connection between two nodes is made up of a number of long-lived
  138. TCP connections, some of which may be idle for an extended period of time.
  139. Nonetheless, Elasticsearch requires these connections to remain open, and it
  140. can disrupt the operation of your cluster if any inter-node connections are
  141. closed by an external influence such as a firewall. It is important to
  142. configure your network to preserve long-lived idle connections between
  143. Elasticsearch nodes, for instance by leaving `*.tcp.keep_alive` enabled and
  144. ensuring that the keepalive interval is shorter than any timeout that might
  145. cause idle connections to be closed, or by setting `transport.ping_schedule` if
  146. keepalives cannot be configured. Devices which drop connections when they reach
  147. a certain age are a common source of problems to Elasticsearch clusters, and
  148. must not be used.
  149. [[request-compression]]
  150. ===== Request compression
  151. The default `transport.compress` configuration option `indexing_data` will only
  152. compress requests that relate to the transport of raw indexing source data
  153. between nodes. This option primarily compresses data sent during ingest,
  154. ccr, and shard recovery. This default normally makes sense for local cluster
  155. communication as compressing raw documents tends significantly reduce inter-node
  156. network usage with minimal CPU impact.
  157. The `transport.compress` setting always configures local cluster request
  158. compression and is the fallback setting for remote cluster request compression.
  159. If you want to configure remote request compression differently than local
  160. request compression, you can set it on a per-remote cluster basis using the
  161. <<remote-cluster-settings,`cluster.remote.${cluster_alias}.transport.compress` setting>>.
  162. [[response-compression]]
  163. ===== Response compression
  164. The compression settings do not configure compression for responses. {es} will
  165. compress a response if the inbound request was compressed--even when compression
  166. is not enabled. Similarly, {es} will not compress a response if the inbound
  167. request was uncompressed--even when compression is enabled. The compression
  168. scheme used to compress a response will be the same scheme the remote node used
  169. to compress the request.