Skip to content

Commit 752719d

Browse files
committed
Separate remote clusters docs from CCS (#34612)
With remote clusters taking on a larger role, we have make the infrastructure more generic than being tied to cross-cluster search (CCS). We want to refer to the remote clusters configuration in the cross-cluster replication (CCR) docs. Yet, these docs are still tied to CCS. This commit extracts the remote clusters docs from CCS (with some wording changes to make them more general) so that we can refer to them in the CCR docs.
1 parent 33eaa02 commit 752719d

File tree

3 files changed

+169
-167
lines changed

3 files changed

+169
-167
lines changed

docs/reference/modules.asciidoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ The modules in this section are:
7878
A tribe node joins one or more clusters and acts as a federated
7979
client across them.
8080

81+
<<modules-remote-cluster, Remote cluster>>::
82+
83+
Remote clusters are used in features that work by connecting across clusters on the transport layer.
84+
8185
<<modules-cross-cluster-search, Cross cluster Search>>::
8286

8387
Cross cluster search enables executing search requests across more than one cluster without joining them and acts
@@ -112,4 +116,6 @@ include::modules/transport.asciidoc[]
112116

113117
include::modules/tribe.asciidoc[]
114118

119+
include::modules/remote-clusters.asciidoc[]
120+
115121
include::modules/cross-cluster-search.asciidoc[]

docs/reference/modules/cross-cluster-search.asciidoc

Lines changed: 2 additions & 167 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,10 @@ multiple clusters. In contrast to the <<modules-tribe,tribe node>> feature, a c
66
join the remote cluster, instead it connects to a remote cluster in a light fashion in order to execute
77
federated search requests.
88

9-
Cross cluster search works by configuring a remote cluster in the cluster state and connecting only to a
10-
limited number of nodes in the remote cluster. Each remote cluster is referenced by a name and a list of seed nodes.
11-
When a remote cluster is registered, its cluster state is retrieved from one of the seed nodes so that up to 3
12-
_gateway nodes_ are selected to be connected to as part of upcoming cross cluster search requests.
13-
Cross cluster search requests consist of uni-directional connections from the coordinating node to the previously
14-
selected remote nodes only. It is possible to tag which nodes should be selected through
15-
node attributes (see <<cross-cluster-search-settings>>).
16-
17-
Each node in a cluster that has remote clusters configured connects to one or more _gateway nodes_ and uses
18-
them to federate search requests to the remote cluster.
19-
209
[float]
21-
=== Configuring Cross Cluster Search
22-
23-
Remote clusters can be specified globally using <<cluster-update-settings,cluster settings>>
24-
(which can be updated dynamically), or local to individual nodes using the
25-
`elasticsearch.yml` file.
26-
27-
If a remote cluster is configured via `elasticsearch.yml` only the nodes with
28-
that configuration will be able to connect to the remote cluster. In other
29-
words, federated search requests will have to be sent specifically to those
30-
nodes. Remote clusters set via the <<cluster-update-settings,cluster settings API>>
31-
will be available on every node in the cluster.
32-
33-
[WARNING]
34-
This feature was added as Beta in Elasticsearch `v5.3` with further improvements made in 5.4 and 5.5. It requires gateway eligible nodes to be on `v5.5` onwards.
35-
36-
The `elasticsearch.yml` config file for a _cross cluster search_ node just needs to list the
37-
remote clusters that should be connected to, for instance:
38-
39-
[source,yaml]
40-
--------------------------------
41-
cluster:
42-
remote:
43-
cluster_one: <1>
44-
seeds: 127.0.0.1:9300
45-
cluster_two: <1>
46-
seeds: 127.0.0.1:9301
47-
48-
--------------------------------
49-
<1> `cluster_one` and `cluster_two` are arbitrary cluster aliases representing the connection to each cluster.
50-
These names are subsequently used to distinguish between local and remote indices.
10+
=== Using cross cluster search
5111

52-
The equivalent example using the <<cluster-update-settings,cluster settings API>>
53-
to add remote clusters to all nodes in the cluster would look like the
54-
following:
12+
Cross-cluster search requires <<modules-remote-clusters,configuring remote clusters>>.
5513

5614
[source,js]
5715
--------------------------------
@@ -84,85 +42,6 @@ PUT _cluster/settings
8442
// TEST[setup:host]
8543
// TEST[s/127.0.0.1:9300/\${transport_host}/]
8644

87-
//////////////////////////
88-
89-
We want to be sure that settings have been updated,
90-
because we'll use them later.
91-
92-
[source,js]
93-
--------------------------------------------------
94-
{
95-
"acknowledged" : true,
96-
"persistent": {
97-
"cluster": {
98-
"remote": {
99-
"cluster_one": {
100-
"seeds": [
101-
"127.0.0.1:9300"
102-
]
103-
},
104-
"cluster_two": {
105-
"seeds": [
106-
"127.0.0.1:9301"
107-
]
108-
},
109-
"cluster_three": {
110-
"seeds": [
111-
"127.0.0.1:9302"
112-
]
113-
}
114-
}
115-
}
116-
},
117-
"transient" : {}
118-
}
119-
--------------------------------------------------
120-
// TESTRESPONSE[s/127.0.0.1:9300/\${transport_host}/]
121-
122-
//////////////////////////
123-
124-
125-
A remote cluster can be deleted from the cluster settings by setting its seeds to `null`:
126-
127-
[source,js]
128-
--------------------------------
129-
PUT _cluster/settings
130-
{
131-
"persistent": {
132-
"cluster": {
133-
"remote": {
134-
"cluster_three": {
135-
"seeds": null <1>
136-
}
137-
}
138-
}
139-
}
140-
}
141-
--------------------------------
142-
// CONSOLE
143-
// TEST[continued]
144-
<1> `cluster_three` would be removed from the cluster settings, leaving `cluster_one` and `cluster_two` intact.
145-
146-
//////////////////////////
147-
148-
We want to be sure that settings have been updated,
149-
because we'll use them later.
150-
151-
[source,js]
152-
--------------------------------------------------
153-
{
154-
"acknowledged" : true,
155-
"persistent" : {},
156-
"transient" : {}
157-
}
158-
--------------------------------------------------
159-
// TESTRESPONSE
160-
161-
//////////////////////////
162-
163-
[float]
164-
=== Using cross cluster search
165-
16645
To search the `twitter` index on remote cluster `cluster_one` the index name
16746
must be prefixed with the cluster alias separated by a `:` character:
16847

@@ -386,47 +265,3 @@ GET /cluster_one:twitter,cluster_two:twitter,twitter/_search <1>
386265
// TESTRESPONSE[s/"_score": 1/"_score": "$body.hits.hits.0._score"/]
387266
// TESTRESPONSE[s/"_score": 2/"_score": "$body.hits.hits.1._score"/]
388267
<1> The `clusters` section indicates that one cluster was unavailable and got skipped
389-
390-
391-
[float]
392-
[[cross-cluster-search-settings]]
393-
=== Cross cluster search settings
394-
395-
`cluster.remote.connections_per_cluster`::
396-
397-
The number of nodes to connect to per remote cluster. The default is `3`.
398-
399-
`cluster.remote.initial_connect_timeout`::
400-
401-
The time to wait for remote connections to be established when the node starts. The default is `30s`.
402-
403-
`cluster.remote.node.attr`::
404-
405-
A node attribute to filter out nodes that are eligible as a gateway node in
406-
the remote cluster. For instance a node can have a node attribute
407-
`node.attr.gateway: true` such that only nodes with this attribute will be
408-
connected to if `cluster.remote.node.attr` is set to `gateway`.
409-
410-
`cluster.remote.connect`::
411-
412-
By default, any node in the cluster can act as a cross-cluster client and
413-
connect to remote clusters. The `cluster.remote.connect` setting can be set
414-
to `false` (defaults to `true`) to prevent certain nodes from connecting to
415-
remote clusters. Cross-cluster search requests must be sent to a node that
416-
is allowed to act as a cross-cluster client.
417-
418-
`cluster.remote.${cluster_alias}.skip_unavailable`::
419-
420-
Per cluster boolean setting that allows to skip specific clusters when no
421-
nodes belonging to them are available and they are searched as part of a
422-
cross cluster search request. Default is `false`, meaning that all clusters
423-
are mandatory by default, but they can selectively be made optional by
424-
setting this setting to `true`.
425-
426-
[float]
427-
[[retrieve-remote-clusters-info]]
428-
=== Retrieving remote clusters info
429-
430-
The <<cluster-remote-info, Remote Cluster Info API>> allows to retrieve
431-
information about the configured remote clusters, as well as the remote
432-
nodes that the Cross Cluster Search node is connected to.
Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,161 @@
1+
[[modules-remote-clusters]]
2+
== Remote clusters
3+
4+
ifndef::include-xpack[]
5+
The _remote clusters_ module allows establishing uni-directional connections to
6+
a remote cluster. This functionality is used in
7+
<<modules-cross-cluster-search,cross-cluster search>>.
8+
endif::[]
9+
ifdef::include-xpack[]
10+
The _remote clusters_ module allows establishing uni-directional connections to
11+
a remote cluster. This functionality is used in cross-cluster replication,
12+
<<modules-cross-cluster-search,cross-cluster search>>.
13+
endif::[]
14+
15+
Remote cluster connections work by configuring a remote cluster and connecting
16+
only to a limited number of nodes in the remote cluster. Each remote cluster is
17+
referenced by a name and a list of seed nodes. When a remote cluster is
18+
registered, its cluster state is retrieved from one of the seed nodes so that by
19+
default up to three _gateway nodes_ are selected to be connected to as part of
20+
remote cluster requests. Remote cluster connections consist of uni-directional
21+
connections from the coordinating node to the previously selected remote nodes
22+
only. It is possible to tag which nodes should be selected through node
23+
attributes (see <<remote-cluster-settings>>).
24+
25+
Each node in a cluster that has remote clusters configured connects to one or
26+
more _gateway nodes_ and uses them to federate requests to the remote cluster.
27+
28+
[float]
29+
[[configuring-remote-clusters]]
30+
=== Configuring Remote Clusters
31+
32+
Remote clusters can be specified globally using
33+
<<cluster-update-settings,cluster settings>> (which can be updated dynamically),
34+
or local to individual nodes using the `elasticsearch.yml` file.
35+
36+
If a remote cluster is configured via `elasticsearch.yml` only the nodes with
37+
that configuration will be able to connect to the remote cluster. In other
38+
words, functionality that relies on remote cluster requests will have to be
39+
driven specifically from those nodes. Remote clusters set via the
40+
<<cluster-update-settings,cluster settings API>> will be available on every node
41+
in the cluster.
42+
43+
The `elasticsearch.yml` config file for a node that connects to remote clusters
44+
needs to list the remote clusters that should be connected to, for instance:
45+
46+
[source,yaml]
47+
--------------------------------
48+
cluster:
49+
remote:
50+
cluster_one: <1>
51+
seeds: 127.0.0.1:9300
52+
cluster_two: <1>
53+
seeds: 127.0.0.1:9301
54+
55+
--------------------------------
56+
<1> `cluster_one` and `cluster_two` are arbitrary _cluster aliases_ representing
57+
the connection to each cluster. These names are subsequently used to distinguish
58+
between local and remote indices.
59+
60+
The equivalent example using the <<cluster-update-settings,cluster settings
61+
API>> to add remote clusters to all nodes in the cluster would look like the
62+
following:
63+
64+
[source,js]
65+
--------------------------------
66+
PUT _cluster/settings
67+
{
68+
"persistent": {
69+
"cluster": {
70+
"remote": {
71+
"cluster_one": {
72+
"seeds": [
73+
"127.0.0.1:9300"
74+
]
75+
},
76+
"cluster_two": {
77+
"seeds": [
78+
"127.0.0.1:9301"
79+
]
80+
},
81+
"cluster_three": {
82+
"seeds": [
83+
"127.0.0.1:9302"
84+
]
85+
}
86+
}
87+
}
88+
}
89+
}
90+
--------------------------------
91+
// CONSOLE
92+
// TEST[setup:host]
93+
// TEST[s/127.0.0.1:9300/\${transport_host}/]
94+
95+
A remote cluster can be deleted from the cluster settings by setting its seeds
96+
to `null`:
97+
98+
[source,js]
99+
--------------------------------
100+
PUT _cluster/settings
101+
{
102+
"persistent": {
103+
"cluster": {
104+
"remote": {
105+
"cluster_three": {
106+
"seeds": null <1>
107+
}
108+
}
109+
}
110+
}
111+
}
112+
--------------------------------
113+
// CONSOLE
114+
// TEST[continued]
115+
<1> `cluster_three` would be removed from the cluster settings, leaving
116+
`cluster_one` and `cluster_two` intact.
117+
118+
[float]
119+
[[remote-cluster-settings]]
120+
=== Remote cluster settings
121+
122+
`cluster.remote.connections_per_cluster`::
123+
124+
The number of gateway nodes to connect to per remote cluster. The default is
125+
`3`.
126+
127+
`cluster.remote.initial_connect_timeout`::
128+
129+
The time to wait for remote connections to be established when the node
130+
starts. The default is `30s`.
131+
132+
`cluster.remote.node.attr`::
133+
134+
A node attribute to filter out nodes that are eligible as a gateway node in
135+
the remote cluster. For instance a node can have a node attribute
136+
`node.attr.gateway: true` such that only nodes with this attribute will be
137+
connected to if `cluster.remote.node.attr` is set to `gateway`.
138+
139+
`cluster.remote.connect`::
140+
141+
By default, any node in the cluster can act as a cross-cluster client and
142+
connect to remote clusters. The `cluster.remote.connect` setting can be set to
143+
`false` (defaults to `true`) to prevent certain nodes from connecting to
144+
remote clusters. Remote cluster requests must be sent to a node that is
145+
allowed to act as a cross-cluster client.
146+
147+
`cluster.remote.${cluster_alias}.skip_unavailable`::
148+
149+
Per cluster boolean setting that allows to skip specific clusters when no
150+
nodes belonging to them are available and they are the targetof a remote
151+
cluster request. Default is `false`, meaning that all clusters are mandatory
152+
by default, but they can selectively be made optional by setting this setting
153+
to `true`.
154+
155+
[float]
156+
[[retrieve-remote-clusters-info]]
157+
=== Retrieving remote clusters info
158+
159+
The <<cluster-remote-info, Remote Cluster Info API>> allows to retrieve
160+
information about the configured remote clusters, as well as the remote nodes
161+
that the node is connected to.

0 commit comments

Comments
 (0)