transport.asciidoc 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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>>, string)
  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>>, string)
  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>>, string)
  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>>, integer)
  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>>, <<time-units,time value>>)
  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>>, string)
  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>>, string)
  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.tcp.keep_alive`::
  57. (<<static-cluster-setting,Static>>, boolean)
  58. Configures the `SO_KEEPALIVE` option for transport sockets, which determines
  59. whether they send TCP keepalive probes. Defaults to `network.tcp.keep_alive`.
  60. `transport.tcp.keep_idle`::
  61. (<<static-cluster-setting,Static>>, integer)
  62. Configures the `TCP_KEEPIDLE` option for transport sockets, which determines
  63. the time in seconds that a connection must be idle before starting to send TCP
  64. keepalive probes. Defaults to `network.tcp.keep_idle` if set, or the system
  65. default otherwise. This value cannot exceed `300` seconds. In cases where the
  66. system default is higher than `300`, the value is automatically lowered to
  67. `300`. Only applicable on Linux and macOS.
  68. `transport.tcp.keep_interval`::
  69. (<<static-cluster-setting,Static>>, integer)
  70. Configures the `TCP_KEEPINTVL` option for transport sockets, which determines
  71. the time in seconds between sending TCP keepalive probes. Defaults to
  72. `network.tcp.keep_interval` if set, or the system default otherwise. This value
  73. cannot exceed `300` seconds. In cases where the system default is higher than
  74. `300`, the value is automatically lowered to `300`. Only applicable on Linux
  75. and macOS.
  76. `transport.tcp.keep_count`::
  77. (<<static-cluster-setting,Static>>, integer)
  78. Configures the `TCP_KEEPCNT` option for transport sockets, which determines the
  79. number of unacknowledged TCP keepalive probes that may be sent on a connection
  80. before it is dropped. Defaults to `network.tcp.keep_count` if set, or the
  81. system default otherwise. Only applicable on Linux and macOS.
  82. `transport.tcp.no_delay`::
  83. (<<static-cluster-setting,Static>>, boolean)
  84. Configures the `TCP_NODELAY` option on transport sockets, which determines
  85. whether {wikipedia}/Nagle%27s_algorithm[TCP no delay] is enabled. Defaults to
  86. `true`.
  87. `transport.tcp.reuse_address`::
  88. (<<static-cluster-setting,Static>>, boolean)
  89. Configures the `SO_REUSEADDR` option for network sockets, which determines
  90. whether the address can be reused or not. Defaults to
  91. `network.tcp.reuse_address`.
  92. `transport.tcp.send_buffer_size`::
  93. (<<static-cluster-setting,Static>>, <<byte-units,byte value>>)
  94. The size of the TCP send buffer for transport traffic. Defaults to
  95. `network.tcp.send_buffer_size`.
  96. `transport.tcp.receive_buffer_size`::
  97. (<<static-cluster-setting,Static>>, <<byte-units,byte value>>)
  98. The size of the TCP receive buffer for transport traffic. Defaults to
  99. `network.tcp.receive_buffer_size`.
  100. `transport.ping_schedule`::
  101. (<<static-cluster-setting,Static>>, <<time-units,time value>>)
  102. Configures the time between sending application-level pings on all transport
  103. connections to promptly detect when a transport connection has failed. Defaults
  104. to `-1` meaning that application-level pings are not sent. You should use TCP
  105. keepalives (see `transport.tcp.keep_alive`) instead of application-level pings
  106. wherever possible.
  107. [[transport-profiles]]
  108. ===== Transport profiles
  109. Elasticsearch allows you to bind to multiple ports on different interfaces by
  110. the use of transport profiles. See this example configuration
  111. [source,yaml]
  112. --------------
  113. transport.profiles.default.port: 9300-9400
  114. transport.profiles.default.bind_host: 10.0.0.1
  115. transport.profiles.client.port: 9500-9600
  116. transport.profiles.client.bind_host: 192.168.0.1
  117. transport.profiles.dmz.port: 9700-9800
  118. transport.profiles.dmz.bind_host: 172.16.1.2
  119. --------------
  120. The `default` profile is special. It is used as a fallback for any other
  121. profiles, if those do not have a specific configuration setting set, and is how
  122. this node connects to other nodes in the cluster.
  123. Other profiles can have any name and can be used to set up specific endpoints
  124. for incoming connections.
  125. The following parameters can be configured on each transport profile, as in the
  126. example above:
  127. * `port`: The port to which to bind.
  128. * `bind_host`: The host to which to bind.
  129. * `publish_host`: The host which is published in informational APIs.
  130. Profiles also support all the other transport settings specified in the
  131. <<transport-settings,transport settings>> section, and use these as defaults.
  132. For example, `transport.profiles.client.tcp.reuse_address` can be explicitly
  133. configured, and defaults otherwise to `transport.tcp.reuse_address`.
  134. [[long-lived-connections]]
  135. ===== Long-lived idle connections
  136. A transport connection between two nodes is made up of a number of long-lived
  137. TCP connections, some of which may be idle for an extended period of time.
  138. Nonetheless, Elasticsearch requires these connections to remain open, and it
  139. can disrupt the operation of your cluster if any inter-node connections are
  140. closed by an external influence such as a firewall. It is important to
  141. configure your network to preserve long-lived idle connections between
  142. Elasticsearch nodes, for instance by leaving `*.tcp.keep_alive` enabled and
  143. ensuring that the keepalive interval is shorter than any timeout that might
  144. cause idle connections to be closed, or by setting `transport.ping_schedule` if
  145. keepalives cannot be configured. Devices which drop connections when they reach
  146. a certain age are a common source of problems to Elasticsearch clusters, and
  147. must not be used.
  148. [[request-compression]]
  149. ===== Request compression
  150. The default `transport.compress` configuration option `indexing_data` will only
  151. compress requests that relate to the transport of raw indexing source data
  152. between nodes. This option primarily compresses data sent during ingest,
  153. ccr, and shard recovery. This default normally makes sense for local cluster
  154. communication as compressing raw documents tends significantly reduce inter-node
  155. network usage with minimal CPU impact.
  156. The `transport.compress` setting always configures local cluster request
  157. compression and is the fallback setting for remote cluster request compression.
  158. If you want to configure remote request compression differently than local
  159. request compression, you can set it on a per-remote cluster basis using the
  160. <<remote-clusters-settings,`cluster.remote.${cluster_alias}.transport.compress` setting>>.
  161. [[response-compression]]
  162. ===== Response compression
  163. The compression settings do not configure compression for responses. {es} will
  164. compress a response if the inbound request was compressed--even when compression
  165. is not enabled. Similarly, {es} will not compress a response if the inbound
  166. request was uncompressed--even when compression is enabled. The compression
  167. scheme used to compress a response will be the same scheme the remote node used
  168. to compress the request.