Skip to content

Commit 0af647e

Browse files
committed
Clarify the behavior of remote/info and resolve/cluster for connected status of remotes
1 parent 20a3492 commit 0af647e

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

docs/reference/cluster/remote-info.asciidoc

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,15 @@ The cluster remote info API allows you to retrieve all of the configured
2525
remote cluster information. It returns connection and endpoint information keyed
2626
by the configured remote cluster alias.
2727

28+
TIP: This endpoint returns the information that reflects state on the cluster
29+
you are querying. The `connected` field reports whether the querying cluster is
30+
currently connected to the remote cluster. It does not necessarily reflect whether
31+
the remote cluster is down or unavailable, only whether there is currently an open
32+
connection to it. Elasticsearch does not spontaneously try to reconnect to a
33+
disconnected remote cluster. To trigger a reconnection, attempt a
34+
<<modules-cross-cluster-search,{ccs}>>, <<esql-cross-clusters,{esql} {ccs}>>,
35+
or try the <<indices-resolve-cluster-api,resolve cluster>> endpoint.
36+
2837

2938
[[cluster-remote-info-api-response-body]]
3039
==== {api-response-body-title}
@@ -34,7 +43,10 @@ by the configured remote cluster alias.
3443
`proxy`.
3544

3645
`connected`::
37-
True if there is at least one connection to the remote cluster.
46+
True if there is at least one open connection to the remote cluster. When
47+
false, it means that the cluster no longer has an open connection to the
48+
remote cluster. It does not necessarily mean that the remote cluster is
49+
down or unavailable, just that at some point a connection was lost.
3850

3951
`initial_connect_timeout`::
4052
The initial connect timeout for remote cluster connections.

docs/reference/indices/resolve-cluster.asciidoc

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,9 @@ with this endpoint.
1616

1717
For each cluster in the index expression, information is returned about:
1818

19-
1. whether the querying ("local") cluster is currently connected to each remote cluster
20-
in the index expression scope
19+
1. whether the querying ("local") cluster was able to connect to each remote cluster
20+
specified in the index expression. Note that this endpoint actively attempts to
21+
contact the remote clusters, unlike the <<cluster-remote-info,remote/info>> endpoint.
2122
2. whether each remote cluster is configured with `skip_unavailable` as `true` or `false`
2223
3. whether there are any indices, aliases or data streams on that cluster that match
2324
the index expression
@@ -110,8 +111,21 @@ ignored when frozen. Defaults to `false`.
110111
deprecated:[7.16.0]
111112

112113

113-
[discrete]
114114
[[usecases-for-resolve-cluster]]
115+
116+
=== Test availability of remote clusters
117+
118+
The <<cluster-remote-info,remote/info>> endpoint is commonly used to test whether the "local"
119+
cluster (the cluster being queried) is connected to its remote clusters, but it does not
120+
necessarily reflect whether the remote cluster is available or not. The remote cluster may
121+
be available, while the local cluster is not currently connected to it.
122+
123+
You can use this API to force a reconnection (for example with `GET _resolve/cluster/*:*`) and
124+
examine the `connected` field in the response for each remote. This will also cause the
125+
<<cluster-remote-info,remote/info>> endpoint to now reflect the fact that a connection has
126+
been (re-)established.
127+
128+
115129
=== Advantages of using this endpoint before a {ccs}
116130

117131
You may want to exclude a cluster or index from a search when:
@@ -195,7 +209,6 @@ The API returns the following response:
195209
<5> The Elasticsearch server version.
196210

197211

198-
[discrete]
199212
[[resolve-cluster-api-error-example]]
200213
==== Identifying potential problems with your {ccs}
201214

0 commit comments

Comments
 (0)