-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Add documentation for remote cluster proxy mode #52779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
3674bbb
0a691a4
93eed4b
275d9d5
99c1680
e97d021
5aaca4a
ee8fa9c
0ec618a
13f22e8
b2b7a43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -17,29 +17,47 @@ Returns configured remote cluster information. | |||||||||||||
==== {api-description-title} | ||||||||||||||
|
||||||||||||||
The cluster remote info API allows you to retrieve all of the configured | ||||||||||||||
remote cluster information. It returns connection and endpoint information keyed | ||||||||||||||
remote cluster information. It returns connection and endpoint information keyed | ||||||||||||||
by the configured remote cluster alias. | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
[[cluster-remote-info-api-response-body]] | ||||||||||||||
==== {api-response-body-title} | ||||||||||||||
|
||||||||||||||
`seeds`:: | ||||||||||||||
The configured initial seed transport addresses of the remote cluster. | ||||||||||||||
`mode`:: | ||||||||||||||
The configured connection mode for the remote cluster. Will be `sniff` or | ||||||||||||||
`proxy`. | ||||||||||||||
|
||||||||||||||
`connected`:: | ||||||||||||||
True if there is at least one connection to the remote cluster. | ||||||||||||||
|
||||||||||||||
`num_nodes_connected`:: | ||||||||||||||
The number of connected nodes in the remote cluster. | ||||||||||||||
|
||||||||||||||
`max_connections_per_cluster`:: | ||||||||||||||
The maximum number of connections maintained for the remote cluster. | ||||||||||||||
|
||||||||||||||
`initial_connect_timeout`:: | ||||||||||||||
The initial connect timeout for remote cluster connections. | ||||||||||||||
|
||||||||||||||
[[skip-unavailable]] | ||||||||||||||
`skip_unavailable`:: | ||||||||||||||
Whether the remote cluster is skipped in case it is searched through | ||||||||||||||
a {ccs} request but none of its nodes are available. | ||||||||||||||
|
||||||||||||||
`seeds`:: | ||||||||||||||
The configured initial seed transport addresses of the remote cluster when | ||||||||||||||
sniff mode is configured. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like it was double indented.
Suggested change
|
||||||||||||||
|
||||||||||||||
`num_nodes_connected`:: | ||||||||||||||
The number of connected nodes in the remote cluster when sniff mode is | ||||||||||||||
configured. | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
`max_connections_per_cluster`:: | ||||||||||||||
The maximum number of connections maintained for the remote cluster when | ||||||||||||||
sniff mode is configured. | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
`address`:: | ||||||||||||||
The configured address for remote connections when proxy mode is configured. | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
`num_sockets_connected`:: | ||||||||||||||
The number of open socket connections to the remote cluster when proxy mode | ||||||||||||||
is configured. | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
`max_socket_connections`:: | ||||||||||||||
The maximum number of socket connections to the remote cluster when proxy | ||||||||||||||
mode is configured. | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -15,21 +15,32 @@ endif::[] | |||||||||||||
|
||||||||||||||
// tag::how-remote-clusters-work[] | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The content in this tagged region gets re-used here: Originally, that was intended to explain the concept of gateway nodes before the recommendations outlined here: With these changes, I don't think this re-use makes sense anymore. I'm also not sure if those recommendations would work with proxy mode. Could you advise on how these changes would impact those CCS recommendations? After that, you can either update those docs as a part of this PR or I can update them as part of a separate PR. Thanks! |
||||||||||||||
Remote cluster connections work by configuring a remote cluster and connecting | ||||||||||||||
only to a limited number of nodes in that remote cluster. Each remote cluster | ||||||||||||||
is referenced by a name and a list of seed nodes. When a remote cluster is | ||||||||||||||
registered, its cluster state is retrieved from one of the seed nodes and up | ||||||||||||||
to three _gateway nodes_ are selected to be connected to as part of remote | ||||||||||||||
cluster requests. | ||||||||||||||
// end::how-remote-clusters-work[] | ||||||||||||||
only to a limited number of nodes in that remote cluster. There are two | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
potential modes for remote cluster connections: sniff mode and proxy mode. | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
All the communication required between different clusters | ||||||||||||||
goes through the <<modules-transport,transport layer>>. Remote cluster | ||||||||||||||
connections consist of uni-directional connections from the coordinating | ||||||||||||||
node to the selected remote _gateway nodes_ only. | ||||||||||||||
node to the remote remote connections. | ||||||||||||||
// end::how-remote-clusters-work[] | ||||||||||||||
|
||||||||||||||
[float] | ||||||||||||||
[[sniff-mode]] | ||||||||||||||
=== Sniff mode | ||||||||||||||
|
||||||||||||||
// tag::how-sniff-mode-works[] | ||||||||||||||
jrodewig marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
A cluster in sniff mode is created by a name and a list of seed nodes. When a | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
remote cluster is registered, its cluster state is retrieved from one of the | ||||||||||||||
seed nodes and up to three _gateway nodes_ are selected to be connected to as | ||||||||||||||
part of remote cluster requests. This mode requires that the _gateway node_ | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
publish addresses are exposed to the local cluster. | ||||||||||||||
|
||||||||||||||
The sniff mode is the default connection mode. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
// end::how-sniff-mode-works[] | ||||||||||||||
jrodewig marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
[float] | ||||||||||||||
[[gateway-nodes-selection]] | ||||||||||||||
=== Gateway nodes selection | ||||||||||||||
==== Gateway nodes selection | ||||||||||||||
|
||||||||||||||
The _gateway nodes_ selection depends on the following criteria: | ||||||||||||||
|
||||||||||||||
|
@@ -62,9 +73,26 @@ communicate with 6.7. The matrix below summarizes compatibility as described abo | |||||||||||||
(see <<remote-cluster-settings>>), though such tagged nodes still have | ||||||||||||||
to satisfy the two above requirements. | ||||||||||||||
|
||||||||||||||
[float] | ||||||||||||||
[[proxy-mode]] | ||||||||||||||
=== Proxy mode | ||||||||||||||
|
||||||||||||||
// tag::how-proxy-mode-works[] | ||||||||||||||
jrodewig marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
A cluster in proxy mode is created by a name and a single proxy address. When | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
a remote cluster is registered, a configurable number of socket connections are | ||||||||||||||
opened to the proxy address. The proxy is required to route those connections to | ||||||||||||||
the remote cluster. Proxy mode does not require that the remote cluster nodes | ||||||||||||||
publish addresses are accessible. | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
The proxy mode is not the default connection mode and must be configured. Similar | ||||||||||||||
to the sniff <<gateway-nodes-selection,gateway nodes>>, the remote | ||||||||||||||
connections are subject to the same version compatibility rules as | ||||||||||||||
<<rolling-upgrades>>. | ||||||||||||||
// end::how-proxy-mode-works[] | ||||||||||||||
jrodewig marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
[float] | ||||||||||||||
[[configuring-remote-clusters]] | ||||||||||||||
=== Configuring remote clusters | ||||||||||||||
==== Configuring remote clusters | ||||||||||||||
|
||||||||||||||
You can configure remote clusters globally by using | ||||||||||||||
<<cluster-update-settings,cluster settings>>, which you can update dynamically. | ||||||||||||||
|
@@ -83,23 +111,32 @@ cluster: | |||||||||||||
cluster_one: <1> | ||||||||||||||
seeds: 127.0.0.1:9300 <2> | ||||||||||||||
transport.ping_schedule: 30s <3> | ||||||||||||||
cluster_two: | ||||||||||||||
seeds: 127.0.0.1:9301 | ||||||||||||||
transport.compress: true <4> | ||||||||||||||
skip_unavailable: true <5> | ||||||||||||||
cluster_two: <1> | ||||||||||||||
mode: sniff <4> | ||||||||||||||
seeds: 127.0.0.1:9301 <2> | ||||||||||||||
transport.compress: true <5> | ||||||||||||||
skip_unavailable: true <6> | ||||||||||||||
cluster_three: <1> | ||||||||||||||
mode: proxy <4> | ||||||||||||||
proxy_address: 127.0.0.1:9302 <7> | ||||||||||||||
|
||||||||||||||
-------------------------------- | ||||||||||||||
<1> `cluster_one` and `cluster_two` are arbitrary _cluster aliases_ representing | ||||||||||||||
the connection to each cluster. These names are subsequently used to distinguish | ||||||||||||||
between local and remote indices. | ||||||||||||||
<1> `cluster_one`, `cluster_two`, and `cluster_three` are arbitrary _cluster aliases_ | ||||||||||||||
representing the connection to each cluster. These names are subsequently used to | ||||||||||||||
distinguish between local and remote indices. | ||||||||||||||
<2> The hostname and <<modules-transport,transport>> port (default: 9300) of a | ||||||||||||||
seed node in the remote cluster. | ||||||||||||||
<3> A keep-alive ping is configured for `cluster_one`. | ||||||||||||||
<4> Compression is explicitly enabled for requests to `cluster_two`. | ||||||||||||||
<5> Disconnected remote clusters are optional for `cluster_two`. | ||||||||||||||
<4> The configured connection mode. By default it is `sniff`, so the mode is implicit | ||||||||||||||
for `cluster_one`. However, it can be explicitly configured as demonstrated by | ||||||||||||||
`cluster_two` and must be explicitly configured for `proxy` mode as demonstrated by | ||||||||||||||
`cluster_three`. | ||||||||||||||
<5> Compression is explicitly enabled for requests to `cluster_two`. | ||||||||||||||
<6> Disconnected remote clusters are optional for `cluster_two`. | ||||||||||||||
<7> The address for the proxy endpoint used to connect to `cluster_three`. | ||||||||||||||
|
||||||||||||||
For more information about the optional transport settings, see | ||||||||||||||
<<modules-transport>>. | ||||||||||||||
<<modules-transport>>. | ||||||||||||||
|
||||||||||||||
|
||||||||||||||
If you use <<cluster-update-settings,cluster settings>>, the remote clusters | ||||||||||||||
|
@@ -119,16 +156,16 @@ PUT _cluster/settings | |||||||||||||
"transport.ping_schedule": "30s" | ||||||||||||||
}, | ||||||||||||||
"cluster_two": { | ||||||||||||||
"mode": "sniff", | ||||||||||||||
"seeds": [ | ||||||||||||||
"127.0.0.1:9301" | ||||||||||||||
], | ||||||||||||||
"transport.compress": true, | ||||||||||||||
"skip_unavailable": true | ||||||||||||||
}, | ||||||||||||||
"cluster_three": { | ||||||||||||||
"seeds": [ | ||||||||||||||
"127.0.0.1:9302" | ||||||||||||||
] | ||||||||||||||
"mode": "proxy", | ||||||||||||||
"proxy_address": "127.0.0.1:9302" | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
|
@@ -139,7 +176,8 @@ PUT _cluster/settings | |||||||||||||
// TEST[s/127.0.0.1:9300/\${transport_host}/] | ||||||||||||||
|
||||||||||||||
You can dynamically update the compression and ping schedule settings. However, | ||||||||||||||
you must re-include seeds in the settings update request. For example: | ||||||||||||||
you must re-include seeds or proxy_address in the settings update request. | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
For example: | ||||||||||||||
|
||||||||||||||
[source,console] | ||||||||||||||
-------------------------------- | ||||||||||||||
|
@@ -155,10 +193,16 @@ PUT _cluster/settings | |||||||||||||
"transport.ping_schedule": "60s" | ||||||||||||||
}, | ||||||||||||||
"cluster_two": { | ||||||||||||||
"mode": "sniff", | ||||||||||||||
"seeds": [ | ||||||||||||||
"127.0.0.1:9301" | ||||||||||||||
], | ||||||||||||||
"transport.compress": false | ||||||||||||||
}, | ||||||||||||||
"cluster_three": { | ||||||||||||||
"mode": "proxy", | ||||||||||||||
"proxy_address": "127.0.0.1:9302", | ||||||||||||||
"transport.compress": true | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
} | ||||||||||||||
|
@@ -171,7 +215,7 @@ NOTE: When the compression or ping schedule settings change, all the existing | |||||||||||||
node connections must close and re-open, which can cause in-flight requests to | ||||||||||||||
fail. | ||||||||||||||
|
||||||||||||||
A remote cluster can be deleted from the cluster settings by setting its seeds and optional settings to `null` : | ||||||||||||||
A remote cluster can be deleted from the cluster settings by setting its settings to `null` : | ||||||||||||||
|
||||||||||||||
[source,console] | ||||||||||||||
-------------------------------- | ||||||||||||||
|
@@ -181,6 +225,7 @@ PUT _cluster/settings | |||||||||||||
"cluster": { | ||||||||||||||
"remote": { | ||||||||||||||
"cluster_two": { <1> | ||||||||||||||
"mode": null, | ||||||||||||||
"seeds": null, | ||||||||||||||
"skip_unavailable": null, | ||||||||||||||
"transport": { | ||||||||||||||
|
@@ -201,23 +246,15 @@ PUT _cluster/settings | |||||||||||||
[[remote-cluster-settings]] | ||||||||||||||
=== Remote cluster settings | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
`cluster.remote.connections_per_cluster`:: | ||||||||||||||
|
||||||||||||||
The number of gateway nodes to connect to per remote cluster. The default is | ||||||||||||||
`3`. | ||||||||||||||
`cluster.remote.${cluster_alias}.mode`:: | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
The mode used for a remote cluster connection. The only supported modes are | ||||||||||||||
`sniff` and `proxy`. | ||||||||||||||
|
||||||||||||||
`cluster.remote.initial_connect_timeout`:: | ||||||||||||||
|
||||||||||||||
The time to wait for remote connections to be established when the node | ||||||||||||||
starts. The default is `30s`. | ||||||||||||||
|
||||||||||||||
`cluster.remote.node.attr`:: | ||||||||||||||
|
||||||||||||||
A node attribute to filter out nodes that are eligible as a gateway node in | ||||||||||||||
the remote cluster. For instance a node can have a node attribute | ||||||||||||||
`node.attr.gateway: true` such that only nodes with this attribute will be | ||||||||||||||
connected to if `cluster.remote.node.attr` is set to `gateway`. | ||||||||||||||
|
||||||||||||||
`cluster.remote.connect`:: | ||||||||||||||
|
||||||||||||||
By default, any node in the cluster can act as a cross-cluster client and | ||||||||||||||
|
@@ -251,6 +288,49 @@ PUT _cluster/settings | |||||||||||||
Elasticsearch compresses the response. If unset, the global | ||||||||||||||
`transport.compress` is used as the fallback setting. | ||||||||||||||
|
||||||||||||||
[float] | ||||||||||||||
[[remote-cluster-sniff-settings]] | ||||||||||||||
=== Remote cluster sniff mode settings | ||||||||||||||
Tim-Brooks marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||
|
||||||||||||||
`cluster.remote.${cluster_alias}.seeds`:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Our docs typically use the
Suggested change
|
||||||||||||||
|
||||||||||||||
The list of seed nodes used to sniff the remote cluster state. | ||||||||||||||
|
||||||||||||||
`cluster.remote.${cluster_alias}.node_connections`:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
||||||||||||||
The number of gateway nodes to connect to for this remote cluster. The default | ||||||||||||||
is `3`. | ||||||||||||||
|
||||||||||||||
`cluster.remote.node.attr`:: | ||||||||||||||
|
||||||||||||||
A node attribute to filter out nodes that are eligible as a gateway node in | ||||||||||||||
the remote cluster. For instance a node can have a node attribute | ||||||||||||||
`node.attr.gateway: true` such that only nodes with this attribute will be | ||||||||||||||
connected to if `cluster.remote.node.attr` is set to `gateway`. | ||||||||||||||
|
||||||||||||||
[float] | ||||||||||||||
[[remote-cluster-proxy-settings]] | ||||||||||||||
=== Remote cluster proxy mode settings | ||||||||||||||
|
||||||||||||||
`cluster.remote.${cluster_alias}.proxy_address`:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
||||||||||||||
The address used for all remote connections. | ||||||||||||||
|
||||||||||||||
`cluster.remote.${cluster_alias}.proxy_socket_connections`:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
||||||||||||||
The number of socket connections to open per remote cluster. The default is | ||||||||||||||
`18`. | ||||||||||||||
ifndef::include-xpack[] | ||||||||||||||
|
||||||||||||||
`cluster.remote.${cluster_alias}.server_name`:: | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should be I'm also not sure if it's necessary to do
Suggested change
|
||||||||||||||
|
||||||||||||||
An optional hostname string which will be sent in the server_name field of | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
the TLS Server Name Indication extension if | ||||||||||||||
<<configuring-tls,{TLS is enabled}>>. The TLS transport will fail to open | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
remote connections if this field is not a valid hostname as defined by the | ||||||||||||||
TLS SNI specification. | ||||||||||||||
endif::[] | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
||||||||||||||
[float] | ||||||||||||||
[[retrieve-remote-clusters-info]] | ||||||||||||||
=== Retrieving remote clusters info | ||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.