@@ -15,21 +15,32 @@ endif::[]
15
15
16
16
// tag::how-remote-clusters-work[]
17
17
Remote cluster connections work by configuring a remote cluster and connecting
18
- only to a limited number of nodes in that remote cluster. Each remote cluster
19
- is referenced by a name and a list of seed nodes. When a remote cluster is
20
- registered, its cluster state is retrieved from one of the seed nodes and up
21
- to three _gateway nodes_ are selected to be connected to as part of remote
22
- cluster requests.
23
- // end::how-remote-clusters-work[]
18
+ only to a limited number of nodes in that remote cluster. There are two
19
+ potential modes for remote cluster connections: sniff mode and proxy mode.
24
20
25
21
All the communication required between different clusters
26
22
goes through the <<modules-transport,transport layer>>. Remote cluster
27
23
connections consist of uni-directional connections from the coordinating
28
- node to the selected remote _gateway nodes_ only.
24
+ node to the remote remote connections.
25
+ // end::how-remote-clusters-work[]
26
+
27
+ [float]
28
+ [[sniff-mode]]
29
+ === Sniff mode
30
+
31
+ // tag::how-sniff-mode-works[]
32
+ A cluster in sniff mode is created by a name and a list of seed nodes. When a
33
+ remote cluster is registered, its cluster state is retrieved from one of the
34
+ seed nodes and up to three _gateway nodes_ are selected to be connected to as
35
+ part of remote cluster requests. This mode requires that the _gateway node_
36
+ publish addresses are exposed to the local cluster.
37
+
38
+ The sniff mode is the default connection mode.
39
+ // end::how-remote-clusters-work[]
29
40
30
41
[float]
31
42
[[gateway-nodes-selection]]
32
- === Gateway nodes selection
43
+ ==== Gateway nodes selection
33
44
34
45
The _gateway nodes_ selection depends on the following criteria:
35
46
@@ -62,9 +73,26 @@ communicate with 6.7. The matrix below summarizes compatibility as described abo
62
73
(see <<remote-cluster-settings>>), though such tagged nodes still have
63
74
to satisfy the two above requirements.
64
75
76
+ [float]
77
+ [[proxy-mode]]
78
+ === Proxy mode
79
+
80
+ // tag::how-proxy-mode-works[]
81
+ A cluster in proxy mode is created by a name and a single proxy address. When
82
+ a remote cluster is registered, a configurable number of socket connections are
83
+ opened to the proxy address. The proxy is required to route those connections to
84
+ the remote cluster. Proxy mode does not require that the remote cluster nodes
85
+ publish addresses are accessible.
86
+
87
+ The proxy mode is not the default connection mode and must be configured. Similar
88
+ to the sniff <<remote-cluster-compatibility-matrix,gateway nodes>>, the remote
89
+ connections are subject to the same version compatibility rules as
90
+ <<rolling-upgrades>>.
91
+ // end::how-remote-clusters-work[]
92
+
65
93
[float]
66
94
[[configuring-remote-clusters]]
67
- === Configuring remote clusters
95
+ ==== Configuring remote clusters
68
96
69
97
You can configure remote clusters globally by using
70
98
<<cluster-update-settings,cluster settings>>, which you can update dynamically.
@@ -83,23 +111,32 @@ cluster:
83
111
cluster_one: <1>
84
112
seeds: 127.0.0.1:9300 <2>
85
113
transport.ping_schedule: 30s <3>
86
- cluster_two:
87
- seeds: 127.0.0.1:9301
88
- transport.compress: true <4>
89
- skip_unavailable: true <5>
114
+ cluster_two: <1>
115
+ mode: sniff <4>
116
+ seeds: 127.0.0.1:9301 <2>
117
+ transport.compress: true <5>
118
+ skip_unavailable: true <6>
119
+ cluster_three: <1>
120
+ mode: proxy <4>
121
+ proxy_address: 127.0.0.1:9302 <7>
90
122
91
123
--------------------------------
92
- <1> `cluster_one` and `cluster_two ` are arbitrary _cluster aliases_ representing
93
- the connection to each cluster. These names are subsequently used to distinguish
94
- between local and remote indices.
124
+ <1> `cluster_one`, `cluster_two`, and `cluster_three ` are arbitrary _cluster aliases_
125
+ representing the connection to each cluster. These names are subsequently used to
126
+ distinguish between local and remote indices.
95
127
<2> The hostname and <<modules-transport,transport>> port (default: 9300) of a
96
128
seed node in the remote cluster.
97
129
<3> A keep-alive ping is configured for `cluster_one`.
98
- <4> Compression is explicitly enabled for requests to `cluster_two`.
99
- <5> Disconnected remote clusters are optional for `cluster_two`.
130
+ <4> The configured connection mode. By default it is `sniff`, so the mode is implicit
131
+ for `cluster_one`. However, it can be explicitly configured as demonstrated by
132
+ `cluster_two` and must be explicitly configured for `proxy` mode as demonstrated by
133
+ `cluster_three`.
134
+ <5> Compression is explicitly enabled for requests to `cluster_two`.
135
+ <6> Disconnected remote clusters are optional for `cluster_two`.
136
+ <7> The address for the proxy endpoint used to connect to `cluster_three`.
100
137
101
138
For more information about the optional transport settings, see
102
- <<modules-transport>>.
139
+ <<modules-transport>>.
103
140
104
141
105
142
If you use <<cluster-update-settings,cluster settings>>, the remote clusters
@@ -119,16 +156,16 @@ PUT _cluster/settings
119
156
"transport.ping_schedule": "30s"
120
157
},
121
158
"cluster_two": {
159
+ "mode": "sniff",
122
160
"seeds": [
123
161
"127.0.0.1:9301"
124
162
],
125
163
"transport.compress": true,
126
164
"skip_unavailable": true
127
165
},
128
166
"cluster_three": {
129
- "seeds": [
130
- "127.0.0.1:9302"
131
- ]
167
+ "mode": "proxy",
168
+ "proxy_address": "127.0.0.1:9302"
132
169
}
133
170
}
134
171
}
@@ -139,7 +176,8 @@ PUT _cluster/settings
139
176
// TEST[s/127.0.0.1:9300/\${transport_host}/]
140
177
141
178
You can dynamically update the compression and ping schedule settings. However,
142
- you must re-include seeds in the settings update request. For example:
179
+ you must re-include seeds or proxy_address in the settings update request.
180
+ For example:
143
181
144
182
[source,console]
145
183
--------------------------------
@@ -155,10 +193,16 @@ PUT _cluster/settings
155
193
"transport.ping_schedule": "60s"
156
194
},
157
195
"cluster_two": {
196
+ "mode": "sniff",
158
197
"seeds": [
159
198
"127.0.0.1:9301"
160
199
],
161
200
"transport.compress": false
201
+ },
202
+ "cluster_three": {
203
+ "mode": "proxy",
204
+ "proxy_address": "127.0.0.1:9302",
205
+ "transport.compress": true
162
206
}
163
207
}
164
208
}
@@ -171,7 +215,7 @@ NOTE: When the compression or ping schedule settings change, all the existing
171
215
node connections must close and re-open, which can cause in-flight requests to
172
216
fail.
173
217
174
- A remote cluster can be deleted from the cluster settings by setting its seeds and optional settings to `null` :
218
+ A remote cluster can be deleted from the cluster settings by setting its settings to `null` :
175
219
176
220
[source,console]
177
221
--------------------------------
@@ -181,6 +225,7 @@ PUT _cluster/settings
181
225
"cluster": {
182
226
"remote": {
183
227
"cluster_two": { <1>
228
+ "mode": null,
184
229
"seeds": null,
185
230
"skip_unavailable": null,
186
231
"transport": {
@@ -201,23 +246,15 @@ PUT _cluster/settings
201
246
[[remote-cluster-settings]]
202
247
=== Remote cluster settings
203
248
204
- `cluster.remote.connections_per_cluster`::
205
-
206
- The number of gateway nodes to connect to per remote cluster. The default is
207
- `3`.
249
+ `cluster.remote.${cluster_alias}.mode`::
250
+ The mode used for a remote cluster connection. The only supported modes are
251
+ `sniff` and `proxy`.
208
252
209
253
`cluster.remote.initial_connect_timeout`::
210
254
211
255
The time to wait for remote connections to be established when the node
212
256
starts. The default is `30s`.
213
257
214
- `cluster.remote.node.attr`::
215
-
216
- A node attribute to filter out nodes that are eligible as a gateway node in
217
- the remote cluster. For instance a node can have a node attribute
218
- `node.attr.gateway: true` such that only nodes with this attribute will be
219
- connected to if `cluster.remote.node.attr` is set to `gateway`.
220
-
221
258
`cluster.remote.connect`::
222
259
223
260
By default, any node in the cluster can act as a cross-cluster client and
@@ -251,6 +288,49 @@ PUT _cluster/settings
251
288
Elasticsearch compresses the response. If unset, the global
252
289
`transport.compress` is used as the fallback setting.
253
290
291
+ [float]
292
+ [[remote-cluster-sniff-settings]]
293
+ === Remote cluster sniff mode settings
294
+
295
+ `cluster.remote.${cluster_alias}.seeds`::
296
+
297
+ The list of seed nodes used to sniff the remote cluster state.
298
+
299
+ `cluster.remote.${cluster_alias}.node_connections`::
300
+
301
+ The number of gateway nodes to connect to for this remote cluster. The default
302
+ is `3`.
303
+
304
+ `cluster.remote.node.attr`::
305
+
306
+ A node attribute to filter out nodes that are eligible as a gateway node in
307
+ the remote cluster. For instance a node can have a node attribute
308
+ `node.attr.gateway: true` such that only nodes with this attribute will be
309
+ connected to if `cluster.remote.node.attr` is set to `gateway`.
310
+
311
+ [float]
312
+ [[remote-cluster-proxy-settings]]
313
+ === Remote cluster proxy mode settings
314
+
315
+ `cluster.remote.${cluster_alias}.proxy_address`::
316
+
317
+ The address used for all remote connections.
318
+
319
+ `cluster.remote.${cluster_alias}.proxy_socket_connections`::
320
+
321
+ The number of socket connections to open per remote cluster. The default is
322
+ `18`.
323
+ ifndef::include-xpack[]
324
+
325
+ `cluster.remote.${cluster_alias}.server_name`::
326
+
327
+ An optional hostname string which will be sent in the server_name field of
328
+ the TLS Server Name Indication extension if
329
+ <<configuring-tls,{TLS is enabled}>>. The TLS transport will fail to open
330
+ remote connections if this field is not a valid hostname as defined by the
331
+ TLS SNI specification.
332
+ endif::[]
333
+
254
334
[float]
255
335
[[retrieve-remote-clusters-info]]
256
336
=== Retrieving remote clusters info
0 commit comments