Commit graph

919 commits

Author SHA1 Message Date
David Turner
1045abe71f
Limit count of HTTP channels with tracked stats (#77303)
Today we expire the client stats for HTTP channels 5 minutes after they
close. It's possible to open a very large number of HTTP channels in 5
minutes, possibly inadvertently, and the stats for those channels can be
overwhelming.

This commit introduces a limit on the number of channels tracked by each
node which applies in addition to the age limit, and makes these limits
configurable via static settings. It drops the pruning of old stats when
starting to track a new channel and instead uses a queue to expire the
oldest stats when each channel closes if necessary to respect the count
limit; it only performs age-based expiry when retrieving the stats,
since the count limit now bounds the memory needed. Finally, it
tightents up some missing synchronization and makes sure that we expose
only immutable objects to the stats subsystem.
2021-09-08 07:25:57 +01:00
Howard
4432b39112
[DOCS] Fix formatting for snapshot_meta thread pool (#76973) 2021-08-26 10:36:26 -04:00
Martijn van Groningen
8a1deff75a
Improve fault-detection.asciidoc (#76821)
Add section to fault-detection.asciidoc about nodes being removed from cluster
due to slow cluster state applying.
2021-08-23 14:31:06 +02:00
Tim Brooks
673e8e17f4
Enable LZ4 transport compression by default (#76326)
This commit enables LZ4 transport compression by default at the
indexing_data level.

Relates to #73497.
2021-08-17 12:19:42 -06:00
Tim Brooks
e6fd459a6e
Respond with same compression scheme received (#76372)
This is related to #73497. Currently, we only use the configured
transport.compression_scheme setting when compressing a request or a
response. Additionally, the cluster.remote.*.compression_scheme
setting is ignored. This commit fixes this behavior by respecting the
per-cluster setting. Additionally, it resolves confusion around inbound
and outbound connections by always responding with the same scheme that
was received. This allows remote connections to have different schemes
than local connections.
2021-08-13 13:29:22 -06:00
Francisco Fernández Castaño
2ebe5cd075
Add peer recoveries using snapshot files when possible (#76237)
This commit adds peer recoveries from snapshots. It allows establishing a replica by downloading file data from a snapshot rather than transferring the data from the primary. 

Enabling this feature is done on the repository definition. Repositories having the setting `use_for_peer_recovery=true` will be consulted to find a good snapshot when recovering a shard.

Relates #73496
2021-08-13 10:42:16 +02:00
Tim Brooks
425b7b280b
Add docs for production ready compression settings (#76441)
In 7.15, we intend for the indexing_data compression level and the
compression scheme lz4 to no longer be experimental. This commit
updates the documentation to reflect this. Additionally, it adds
missing docs for the cluster.remote.*.transport.compression_scheme
setting.

Relates to #73497.
2021-08-12 16:48:56 -06:00
David Turner
e6a39e6ddc
Add note on special network values docs (#75779)
The special values `_global_`, `_site_`, `0.0.0.0` and so on may resolve
to multiple addresses, of which one is chosen to be the publish address.
This commit generalises the warning about reachability as applied to
DNS-resolved hostnames to also apply to these special values.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-08-09 17:05:54 +01:00
Francisco Fernández Castaño
3c8b9a6f2e
Add peer recovery planners that take into account available snapshots (#75840)
This commit adds a new set of classes that would compute a peer
recovery plan, based on source files + target files + available
snapshots. When possible it would try to maximize the number of
files used from a snapshot. It uses repositories with `use_for_peer_recovery`
setting set to true.

It adds a new recovery setting `indices.recovery.use_snapshots`

Relates #73496
2021-08-09 14:03:12 +02:00
James Rodewig
5252995b48
[DOCS] Document regex circuit breaker (#76048)
Documents the `script.painless.regex.enabled` and
`script.painless.regex.limit-factor` cluster settings.

Relates to #63029.

Closes #75199.
2021-08-04 16:37:29 -04:00
Adrien Grand
feb6620d14
indices.query.bool.max_clause_count now limits all query clauses (#75297)
In the upcoming Lucene 9 release, `indices.query.bool.max_clause_count` is
going to apply to the entire query tree rather than per `bool` query. In order
to avoid breaks, the limit has been bumped from 1024 to 4096.

The semantics will effectively change when we upgrade to Lucene 9, this PR
is only about agreeing on a migration strategy and documenting this change.

To avoid further breaks, I am leaning towards keeping the current setting name
even though it contains `bool`. I believe that it still makes sense given that
`bool` queries are typically the main contributors to high numbers of clauses.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-07-21 12:16:30 +02:00
David Turner
68db1fd780
Advise away from a ping schedule on remote connxns (#75513)
Today the docs for remote cluster connections use `ping_schedule` fairly
liberally, and don't mention that you should prefer TCP keepalives
wherever possible. This commit reduces the use of this setting in the
examples and adjusts the description of the setting to include a note
about TCP keepalives instead.
2021-07-20 19:09:13 +01:00
James Rodewig
76938006ab
[DOCS] Note required node roles and data tiers (#74566)
Closes #74528 and #74565
2021-07-07 09:57:32 -04:00
Lisa Cawley
9ab6808206
[DOCS] Clean up xpack.ml.enabled details (#74573) 2021-06-30 09:34:46 -07:00
Tim Brooks
293d490ded
Add additional transport compression options (#74587)
This commit is related to #73497. It adds two new settings. The first setting
is transport.compression_scheme. This setting allows the user to
configure LZ4 or DEFLATE as the transport compression. Additionally, it
modifies transport.compress to support the value indexing_data. When
this setting is set to indexing_data only messages which are primarily
composed of raw source data will be compressed. This is bulk, operations
recovery, and shard changes messages.
2021-06-29 12:14:47 -06:00
James Rodewig
b207aac9ed [DOCS] Increase search.max_bucket default value by one
Relates to #70645.
2021-06-29 08:38:24 -04:00
François-Clément Brossard
0ea7cbd429
[DOC] Add watcher to the threadpool doc (#73935)
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
Co-authored-by: Joe Gallo <joegallo@gmail.com>
2021-06-16 11:07:36 -04:00
David Turner
3660d863db
Fork the sending of file chunks during recovery (#74164)
Today if sending file chunks is CPU-bound (e.g. when using compression)
then we tend to concentrate all that work onto relatively few threads,
even if `indices.recovery.max_concurrent_file_chunks` is increased. With
this commit we fork the transmission of each chunk onto its own thread
so that the CPU-bound work can happen in parallel.
2021-06-16 11:58:13 +01:00
David Turner
43ddd4a580
Fix docs rendering around recovery rate table (#73879)
- Replaces ⇐ with ≤
- Removes table caption
- Adjust table headers
- Fixes leading + on subsequent paragraphs
2021-06-08 15:00:00 +01:00
Henning Andersen
a11e6f5c6e
Breaking change for single data node setting (#73737)
In #55805, we added a setting to allow single data node clusters to
respect the high watermark. In #73733 we added the related deprecations.
This commit ensures the only valid value for the setting is true and
adds deprecations if the setting is set. The setting will be removed
in a future release.

Co-authored-by: David Turner <david.turner@elastic.co>
2021-06-07 13:12:04 +02:00
William Brafford
1c295a92d8
Add threadpool for critical operations on system indices (#72625)
* Add new thread pool for critical operations
* Split critical thread pool into read and write
* Add POJO to hold thread pool names
* Add tests for critical thread pools
* Add thread pools to data streams
* Update settings for security plugin
* Retrieve ExecutorSelector from SystemIndices where possible
* Use a singleton ExecutorSelector
2021-06-03 12:07:37 -04:00
Luca Belluccini
3e41d753e3
[DOCS] Note circuit breakers reject requests with 429 HTTP status code (#69864)
We mention Elasticsearch returns 429 if the circuit breaker trips in https://www.elastic.co/blog/improving-node-resiliency-with-the-real-memory-circuit-breaker, but there is no mention in the docs.

This adds an xref to circuit breaker errors section.

Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-06-02 10:31:24 -04:00
Armin Braun
da242856fd
Introduce SNAPSHOT_META Threadpool for Fetching Repository Metadata (#73172)
Adds new snapshot meta pool that is used to speed up the get snapshots API
by making `SnapshotInfo` load in parallel. Also use this pool to load
`RepositoryData`.
A follow-up to this would expand the use of this pool to the snapshot status
API and make it run in parallel as well.
2021-05-18 14:40:39 +02:00
David Turner
eabe2d1b34
Increase PeerFinder verbosity on persistent failure (#73128)
If a node is partitioned away from the rest of the cluster then the
`ClusterFormationFailureHelper` periodically reports that it cannot
discover the expected collection of nodes, but does not indicate why. To
prove it's a connectivity problem, users must today restart the node
with `DEBUG` logging on `org.elasticsearch.discovery.PeerFinder` to see
further details.

With this commit we log messages at `WARN` level if the node remains
disconnected for longer than a configurable timeout, which defaults to 5
minutes.

Relates #72968
2021-05-17 10:52:18 +01:00
James Rodewig
dbad9d0a0d
[DOCS] Update 'shared_cache' references for searchable snapshots (#72775) 2021-05-05 17:49:15 -04:00
Luca Belluccini
647ba8f124
[DOCS] Clarify remote_cluster_client is required to run ML (#72569)
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
2021-05-04 18:25:42 -07:00
David Turner
12b60f64ba Trivial typo: bindiing -> binding 2021-04-27 12:20:46 +01:00
Henning Andersen
794869cfbb
Add separate flood stage limit for frozen (#71855)
Dedicated frozen nodes can survive less headroom than other data nodes.
This commits introduces a separate flood stage threshold for frozen as
well as an accompanying max_headroom setting that caps the amount of
free space necessary on frozen.

Relates #71844
2021-04-20 15:51:52 +02:00
Henning Andersen
eee399aeb5
Introduce separate shard limit for frozen shards (#71392)
Frozen indices (partial searchable snapshots) require less heap per
shard and the limit can therefore be raised for those. We pick 3000
frozen shards per frozen data node, since we think 2000 is reasonable
to use in production.

Relates #71042 and #34021
2021-04-15 19:33:29 +02:00
James Rodewig
d3c56e6fca [DOCS] Remove unneeded articles for Elasticsearch Service and Elastic Agent 2021-04-02 16:01:59 -04:00
Dan Hermann
579d0367b1
[DOCS] http.client_stats.enabled setting (#71188) 2021-04-02 07:58:05 -05:00
James Rodewig
693807a6d3
[DOCS] Fix double spaces (#71082) 2021-03-31 09:57:47 -04:00
Adam Locke
8dd563134c
[DOCS] Overhaul TLS security docs (#68946)
* Removing security overview and condensing.

* Adding new security file.

* Minor changes.

* Removing link to pass build.

* Adding minimal security page.

* Adding minimal security page.

* Changes to intro.

* Add basic and basic + http configurations.

* Lots of changes, removed files, and redirects.

* Moving some AD and LDAP sections, plus more redirects.

* Redirects for SAML.

* Updating snippet languages and redirects.

* Adding another SAML redirect.

* Hopefully fixing the ci/2 error.

* Fixing another broken link for SAML.

* Adding what's next sections and some cleanup.

* Removes both security tutorials from the TOC.

* Adding redirect for removed tutorial.

* Add graphic for Elastic Security layers.

* Incorporating reviewer feedback.

* Update x-pack/docs/en/security/securing-communications/security-basic-setup.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Update x-pack/docs/en/security/securing-communications/security-minimal-setup.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Update x-pack/docs/en/security/securing-communications/security-basic-setup.asciidoc

Co-authored-by: Yang Wang <ywangd@gmail.com>

* Update x-pack/docs/en/security/index.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Update x-pack/docs/en/security/securing-communications/security-basic-setup-https.asciidoc

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>

* Apply suggestions from code review

Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>

* Additional changes from review feedback.

* Incorporating reviewer feedback.

* Incorporating more reviewer feedback.

* Clarify that TLS is for authenticating nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Clarify security between nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Clarify that TLS is between nodes

Co-authored-by: Tim Vernum <tim@adjective.org>

* Update title for configuring Kibana with a password

Co-authored-by: Tim Vernum <tim@adjective.org>

* Move section for enabling passwords between Kibana and ES to minimal security.

* Add section for transport description, plus incorporate more reviewer feedback.

* Moving operator privileges lower in the navigation.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Co-authored-by: Ioannis Kakavas <ikakavas@protonmail.com>
Co-authored-by: Yang Wang <ywangd@gmail.com>
Co-authored-by: Tim Vernum <tim@adjective.org>
2021-03-25 11:54:39 -04:00
James Rodewig
1b06f4cc62
[DOCS] Add info about allowed profile names (#70440) (#70815)
Co-authored-by: Robin Clarke <robin.clarke@elastic.co>
2021-03-24 10:10:21 -04:00
David Turner
dd69ae95d7
Note recovery settings affect searchable snapshots (#70771)
Adds a short note that `max_restore_bytes_per_sec` and
`indices.recovery.max_bytes_per_sec` also affect the recovery of a
searchable snapshot index.
2021-03-24 09:22:44 +00:00
Henning Andersen
9002bd81a1
[DOCS] Frozen tier dedicated (#70542)
The frozen tier is now dedicated for searchable snapshots mounted with
the `shared_cache` option. This commit adjusts docs accordingly.
2021-03-19 11:16:41 +01:00
David Turner
737d850ac6
Clarify persistence on master-eligible nodes (#70556)
We document that master nodes should have a persistent data path but
it's a bit hard to understand that this is what the docs are saying and
we don't really say why it's important. This commit clarifies this
paragraph.

Relates 49d0f3406c
2021-03-18 14:51:11 +00:00
David Turner
ee0f116e9e
Recommend no requests to dedicated masters (#70491)
Today the docs on node roles say that you shouldn't use dedicated
masters for heavy requests such as indexing and searching, but as per
the "designing for resilience" docs this guidance applies to all client
requests. This commit generalises the node roles docs slightly to
clarify this.

Relates #70435
2021-03-18 12:29:52 +00:00
James Rodewig
5c75d004fa
[DOCS] Replace put with create or update in API names (#70330)
Co-authored-by: debadair <debadair@elastic.co>
Co-authored-by: Lisa Cawley <lcawley@elastic.co>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
2021-03-15 14:49:44 -04:00
Jason Tedor
cfad8376f4
Clarify remote_cluster_client role (#70186)
This commit addresses two aspects of the description in the docs of
configuring a local node to be a remote cluster client. First, the
documentation was referring to the legacy setting for configuring a
remote cluster client. Secondly, we clarify that additional features,
not only cross-cluster search, have requirements around the usage of the
remote_cluster_client role.

Co-authored-by: Przemysław Witek <przemyslaw.witek@elastic.co>
Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
2021-03-11 20:28:26 -05:00
James Rodewig
8d4ef1e38e
[DOCS] Update ingest pipeline xrefs (#70178) 2021-03-10 08:28:19 -05:00
Mike Barretta
d6047a966f
[DOCS] Fix typo (#69838) 2021-03-03 09:16:39 -05:00
José Arthur Benetasso Villanova
3b1c03dc49
[DOCS] Fix typo (#69654) 2021-03-01 09:34:56 -05:00
James Rodewig
5ff8b8c730
[DOCS] Remove outdated default distro refs (#69465) 2021-02-23 12:26:57 -05:00
James Rodewig
a32cf65705
[DOCS] Reword node roles docs (#69301) 2021-02-23 11:32:46 -05:00
David Turner
bb3ea99850
Skip zone/host awareness with auto-expand replicas (#69334)
Today if an index is set to `auto_expand_replicas: N-all` then we will
try and create a shard copy on every node that matches the applicable
allocation filters. This conflits with shard allocation awareness and
the same-host allocation decider if there is an uneven distribution of
nodes across zones or hosts, since these deciders prevent shard copies
from being allocated unevenly and may therefore leave some unassigned
shards.

The point of these two deciders is to improve resilience given a limited
number of shard copies but there is no need for this behaviour when the
number of shard copies is not limited, so this commit supresses them in
that case.

Closes #54151
Closes #2869
2021-02-22 16:53:58 +00:00
James Rodewig
9b88ae92e6
[DOCS] Fix typos for duplicate words (#69125) 2021-02-17 10:34:20 -05:00
James Rodewig
5f3542a28e
[DOCS] Add data_frozen role to node docs (#68713) 2021-02-08 17:43:47 -05:00
Lee Hinman
3f9f007545
Add the frozen tier node role and ILM phase (#68605)
This commit adds the `data_frozen` node role as part of the formalization of data tiers. It also
adds the `"frozen"` phase to ILM, currently allowing the same actions as the existing cold phase.

The frozen phase is intended to be used for data even less frequently searched than the cold phase,
and will eventually be loosely tied to data using partial searchable snapshots (as oppposed to full
searchable snapshots in the cold phase).

Relates to #60848
2021-02-05 14:38:13 -07:00
Jason Tedor
6e94e67ae9
Set recovery rate for dedicated cold nodes (#68480)
This commit sets the recovery rate for dedicated cold nodes. The goal is
here is enhance performance of recovery in a dedicated cold tier, where
we expect such nodes to be predominantly using searchable snapshots to
back the indices located on them. This commit follows a simple approach
where we increase the recovery rate as a function of the node size, for
nodes that appear to be dedicated cold nodes.
2021-02-04 10:36:07 -05:00