Skip to content
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

[DOCS] add details on version compatibility and remote gateway selection #40056

Merged
merged 20 commits into from
Mar 18, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
59b9fda
[DOCS] add details on version compatibility and remote gateway selection
javanna Mar 14, 2019
f63de4f
Update docs/reference/modules/cross-cluster-search.asciidoc
lcawl Mar 15, 2019
a76f368
Update docs/reference/modules/cross-cluster-search.asciidoc
lcawl Mar 15, 2019
cedeb0d
Update docs/reference/modules/cross-cluster-search.asciidoc
lcawl Mar 15, 2019
63fade9
Update docs/reference/modules/cross-cluster-search.asciidoc
lcawl Mar 15, 2019
d35bbaf
Update docs/reference/modules/cross-cluster-search.asciidoc
lcawl Mar 15, 2019
6c126f2
Update docs/reference/modules/cross-cluster-search.asciidoc
lcawl Mar 15, 2019
5122355
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
371f89f
Update docs/reference/modules/cross-cluster-search.asciidoc
lcawl Mar 15, 2019
0d50984
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
f1ef469
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
980017f
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
d458d56
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
7ee104d
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
d021c15
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
7ef7138
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
d9419d4
Update docs/reference/modules/remote-clusters.asciidoc
lcawl Mar 15, 2019
6ab8f72
Merge branch 'master' into docs/remote_clusters_compatibility
javanna Mar 15, 2019
2ba8edc
address comments
javanna Mar 15, 2019
5ef3786
remove section
javanna Mar 15, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions docs/reference/modules/cross-cluster-search.asciidoc
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[[modules-cross-cluster-search]]
== Cross Cluster Search

The _cross cluster search_ feature allows any node to act as a federated client across
multiple clusters. A cross cluster search node won't join the remote cluster, instead
it connects to a remote cluster in a light fashion in order to execute
federated search requests.
The _cross cluster search_ feature allows any node to act as a federated client
across multiple clusters. A cross cluster search node won't join the remote
cluster, instead it connects to a remote cluster in a light fashion in order
to execute federated search requests. For details on communication between
javanna marked this conversation as resolved.
Show resolved Hide resolved
different clusters and compatibility, see <<modules-remote-clusters>>.
javanna marked this conversation as resolved.
Show resolved Hide resolved

[float]
=== Using cross cluster search
Expand Down Expand Up @@ -43,7 +44,8 @@ PUT _cluster/settings
// TEST[s/127.0.0.1:9300/\${transport_host}/]

To search the `twitter` index on remote cluster `cluster_one` the index name
must be prefixed with the cluster alias separated by a `:` character:
must be prefixed with the alias of the remote cluster followed by the `:`
character:

[source,js]
--------------------------------------------------
Expand Down Expand Up @@ -104,7 +106,7 @@ GET /cluster_one:twitter/_search
// TESTRESPONSE[s/"_score": 1/"_score": "$body.hits.hits.0._score"/]


Indices can also be searched with the same name on different clusters:
Indices with the same name on different clusters can also be searched:

[source,js]
--------------------------------------------------
Expand All @@ -120,10 +122,10 @@ GET /cluster_one:twitter,twitter/_search
// CONSOLE
// TEST[continued]

Search results are disambiguated the same way as the indices are disambiguated in the request. Even if index names are
identical these indices will be treated as different indices when results are merged. All results retrieved from a
remote index
will be prefixed with their remote cluster name:
Search results are disambiguated the same way as the indices are disambiguated in the request.
Indices with same names are treated as different indices when results are merged. All results
retrieved from an index located in a remote cluster are prefixed with their corresponding
cluster alias:

[source,js]
--------------------------------------------------
Expand Down Expand Up @@ -185,10 +187,11 @@ will be prefixed with their remote cluster name:
[float]
=== Skipping disconnected clusters

By default all remote clusters that are searched via Cross Cluster Search need to be available when
the search request is executed, otherwise the whole request fails and no search results are returned
despite some of the clusters are available. Remote clusters can be made optional through the
boolean `skip_unavailable` setting, set to `false` by default.
By default all remote clusters that are searched via Cross Cluster Search need
javanna marked this conversation as resolved.
Show resolved Hide resolved
to be available when the search request is executed, otherwise the whole
javanna marked this conversation as resolved.
Show resolved Hide resolved
request fails and no search results are returned despite some of the clusters
javanna marked this conversation as resolved.
Show resolved Hide resolved
are available. Remote clusters can be made optional through the boolean
javanna marked this conversation as resolved.
Show resolved Hide resolved
`skip_unavailable` setting, set to `false` by default.
javanna marked this conversation as resolved.
Show resolved Hide resolved

[source,js]
--------------------------------
Expand Down Expand Up @@ -312,6 +315,3 @@ The <<search-request-body, search API>> supports the `ccs_minimize_roundtrips`
parameter, which defaults to `true` and can be set to `false` in case
minimizing network round-trips is not desirable.

Note that all the communication between the nodes, regardless of which cluster
they belong to and the selected reduce mode, happens through the
<<modules-transport,transport layer>>.
67 changes: 55 additions & 12 deletions docs/reference/modules/remote-clusters.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,65 @@ connections to a remote cluster. This functionality is used in
endif::[]

Remote cluster connections work by configuring a remote cluster and connecting
only to a limited number of nodes in the 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 so that by
default up to three _gateway nodes_ are selected to be connected to as part of
remote cluster requests. Remote cluster connections consist of uni-directional
connections from the coordinating node to the previously selected remote nodes
only. You can tag which nodes should be selected by using node attributes (see <<remote-cluster-settings>>).
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. All the communication required between different clusters
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

three gateway nodes are selected to be connected to as part of remote cluster requests

It is unclear at this point in the page whether those three gateway nodes are used permanently or just for a particular request or whether the selection can change over time...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They are used for all CCR and CCS requests from then on. The selection may change if one or more of those nodes are shut down, in that case they will get replaced.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think we should add that piece of info here.

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. By default each node in
a cluster that has remote clusters configured connects to one or more remote
_gateway nodes_ and uses them to federate requests to the remote cluster.
javanna marked this conversation as resolved.
Show resolved Hide resolved

Each node in a cluster that has remote clusters configured connects to one or
more _gateway nodes_ and uses them to federate requests to the remote cluster.
[float]
[[gateway-nodes-selection]]
=== Gateway nodes selection

The _gateway nodes_ selection depends on the following criteria:

- *version*: remote nodes need to be compatible with the cluster they are
javanna marked this conversation as resolved.
Show resolved Hide resolved
registered to. This is subject to the same rules as <<rolling-upgrades>>.
Any node can communicate with any other node on the same major version (e.g.
6.0 can talk to any 6.x node). Only nodes on the last minor version of a
certain major version are able to communicate with nodes on the following major
javanna marked this conversation as resolved.
Show resolved Hide resolved
version (e.g. 6.7 can communicate with 7.0, as well as any 7.x node, while
6.6 or earlier cannot talk to any 7.x node). Note that version compatibility
is symmetric, meaning that if 6.7 can communicate with 7.0, 7.0 can also
communicate with 6.7. The matrix below summarizes compatibility as described
above.

[cols="^,^,^,^,^,^"]
|====
| Compatibility | 5.0->5.5 | 5.6 | 6.0->6.6 | 6.7 | 7.x
| 5.0->5.5 | Yes | Yes | No | No | No
| 5.6 | Yes | Yes | Yes | Yes | No
| 6.0->6.6 | No | Yes | Yes | Yes | No
| 6.7 | No | Yes | Yes | Yes | Yes
| 7.x | No | No | No | Yes | Yes
|====

NOTE: When needing to connect incompatible clusters on subsequent major
javanna marked this conversation as resolved.
Show resolved Hide resolved
versions, it is possible to add to the cluster on the lower version one or
javanna marked this conversation as resolved.
Show resolved Hide resolved
more <<coordinating-only-node,coordinating only nodes>> on the intermediate
version that supports communicating with both ends. For instance, a 7.0
javanna marked this conversation as resolved.
Show resolved Hide resolved
cluster can communicate with 6.6 or earlier nodes as long as at least one 6.7
_gateway node_ is present in their cluster. Beware that only features
supported by the lower version can be used in that case.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will remove this note, I got feedback that it may be problematic for CCR and I also find it a bit confusing.


- *role*: dedicated master nodes never get selected
javanna marked this conversation as resolved.
Show resolved Hide resolved
- *attributes*: you can tag which nodes should be selected
javanna marked this conversation as resolved.
Show resolved Hide resolved
(see <<remote-cluster-settings>>), though such tagged nodes still have
to satisfy the two above requirements
javanna marked this conversation as resolved.
Show resolved Hide resolved

[float]
[[configuring-remote-clusters]]
=== Configuring remote clusters

You can configure remote clusters globally by using
<<cluster-update-settings,cluster settings>>, which you can update dynamically.
Alternatively, you can configure them locally on individual nodes by using the `elasticsearch.yml` file.
Alternatively, you can configure them locally on individual nodes by using the
`elasticsearch.yml` file.

If you specify the settings in `elasticsearch.yml` files, only the nodes with
those settings can connect to the remote cluster. In other words, functionality
Expand Down Expand Up @@ -59,7 +100,8 @@ between local and remote indices.
For more information about the optional transport settings, see
<<modules-transport>>.

If you use <<cluster-update-settings,cluster settings>>, the remote clusters are available on every node in the cluster. For example:
If you use <<cluster-update-settings,cluster settings>>, the remote clusters
are available on every node in the cluster. For example:

[source,js]
--------------------------------
Expand Down Expand Up @@ -211,4 +253,5 @@ PUT _cluster/settings

You can use the <<cluster-remote-info, remote cluster info API>> to retrieve
information about the configured remote clusters, as well as the remote nodes
that the node is connected to.
that the node is connected to. This is particularly useful to verify which
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as well as the remote nodes that the node is connected to.

The API reference information (https://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-remote-info.html) implies that "connected" is true/false. Is that correct or does it list the gateway nodes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very good point. we do return a list of nodes but it's the list of seed nodes apparently rather than the selected gateway nodes, I need to adapt this then. Thanks for noticing!

nodes get selected based on the criteria listed <<gateway-nodes-selection,above>>.
javanna marked this conversation as resolved.
Show resolved Hide resolved