Skip to content

Commit df02193

Browse files
Deploy and manage: Autoscaling migration #344 (#606)
Based on the following task: elastic/docs-projects#344 --------- Co-authored-by: shainaraskas <[email protected]>
1 parent 65dc74f commit df02193

36 files changed

+1186
-1862
lines changed

deploy-manage/autoscaling.md

Lines changed: 34 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,54 @@
11
---
22
mapped_urls:
3-
- https://www.elastic.co/guide/en/cloud-heroku/current/ech-autoscaling.html
4-
- https://www.elastic.co/guide/en/cloud/current/ec-autoscaling.html
5-
- https://www.elastic.co/guide/en/cloud-enterprise/current/ece-autoscaling.html
63
- https://www.elastic.co/guide/en/elasticsearch/reference/current/xpack-autoscaling.html
4+
applies_to:
5+
deployment:
6+
ece: ga
7+
ess: ga
8+
eck: ga
9+
serverless: all
710
---
811

912
# Autoscaling
1013

11-
% What needs to be done: Refine
14+
The autoscaling feature adjusts resources based on demand. A deployment can use autoscaling to scale resources as needed, ensuring sufficient capacity to meet workload requirements. In {{ece}}, {{eck}}, and {{ech}} deployments, autoscaling follows predefined policies, while in {{serverless-short}}, it is fully managed and automatic.
1215

13-
% GitHub issue: https://github.com/elastic/docs-projects/issues/344
16+
:::{{tip}} - Serverless handles autoscaling for you
17+
By default, {{serverless-full}} automatically scales your {{es}} resources based on your usage. You don't need to enable autoscaling.
18+
:::
1419

15-
% Scope notes: Creating a new landing page and subheadings/pages for different deployment types. Merge content when appropriate
20+
## Cluster autoscaling
1621

17-
% Use migrated content from existing pages that map to this page:
22+
::::{admonition} Indirect use only
23+
This feature is designed for indirect use by {{ech}}, {{ece}}, and {{eck}}. Direct use is not supported.
24+
::::
1825

19-
% - [ ] ./raw-migrated-files/cloud/cloud-heroku/ech-autoscaling.md
20-
% Notes: 1 child
21-
% - [ ] ./raw-migrated-files/cloud/cloud/ec-autoscaling.md
22-
% Notes: 2 children
23-
% - [ ] ./raw-migrated-files/cloud/cloud-enterprise/ece-autoscaling.md
24-
% Notes: 2 children
25-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/xpack-autoscaling.md
26+
Cluster autoscaling allows an operator to create tiers of nodes that monitor themselves and determine if scaling is needed based on an operator-defined policy. An Elasticsearch cluster can use the autoscaling API to report when additional resources are required. For example, an operator can define a policy that scales a warm tier based on available disk space. Elasticsearch monitors disk space in the warm tier. If it predicts low disk space for current and future shard copies, the autoscaling API reports that the cluster needs to scale. It remains the responsibility of the operator to add the additional resources that the cluster signals it requires.
2627

27-
% Internal links rely on the following IDs being on this page (e.g. as a heading ID, paragraph ID, etc):
28+
A policy is composed of a list of roles and a list of deciders. The policy governs the nodes matching the roles. The deciders provide independent estimates of the capacity required. See [Autoscaling deciders](../deploy-manage/autoscaling/autoscaling-deciders.md) for details on available deciders.
2829

29-
$$$ec-autoscaling-intro$$$
30+
Cluster autoscaling supports:
31+
* Scaling machine learning nodes up and down.
32+
* Scaling data nodes up based on storage.
3033

31-
$$$ec-autoscaling-factors$$$
34+
## Trained model autoscaling
3235

33-
$$$ec-autoscaling-notifications$$$
36+
:::{admonition} Trained model auto-scaling for self-managed deployments
37+
The available resources of self-managed deployments are static, so trained model autoscaling is not applicable. However, available resources are still segmented based on the settings described in this section.
38+
:::
3439

35-
$$$ec-autoscaling-restrictions$$$
40+
Trained model autoscaling automatically adjusts the resources allocated to trained model deployments based on demand. This feature is available on all cloud deployments (ECE, ECK, ECH) and {{serverless-short}}. See [Trained model autoscaling](/deploy-manage/autoscaling/trained-model-autoscaling.md) for details.
3641

37-
$$$ec-autoscaling-enable$$$
42+
Trained model autoscaling supports:
43+
* Scaling trained model deployments
3844

39-
$$$ec-autoscaling-update$$$
45+
::::{note}
46+
Autoscaling is not supported on Debian 8.
47+
::::
4048

41-
$$$ece-autoscaling-intro$$$
49+
Find instructions on setting up and managing autoscaling, including supported environments, configuration options, and examples:
4250

43-
$$$ece-autoscaling-factors$$$
44-
45-
$$$ece-autoscaling-notifications$$$
46-
47-
$$$ece-autoscaling-restrictions$$$
48-
49-
$$$ece-autoscaling-enable$$$
50-
51-
$$$ece-autoscaling-update$$$
52-
53-
$$$ech-autoscaling-intro$$$
54-
55-
$$$ech-autoscaling-factors$$$
56-
57-
$$$ech-autoscaling-notifications$$$
58-
59-
$$$ech-autoscaling-restrictions$$$
60-
61-
$$$ech-autoscaling-enable$$$
62-
63-
$$$ech-autoscaling-update$$$
64-
65-
**This page is a work in progress.** The documentation team is working to combine content pulled from the following pages:
66-
67-
* [/raw-migrated-files/cloud/cloud-heroku/ech-autoscaling.md](/raw-migrated-files/cloud/cloud-heroku/ech-autoscaling.md)
68-
* [/raw-migrated-files/cloud/cloud/ec-autoscaling.md](/raw-migrated-files/cloud/cloud/ec-autoscaling.md)
69-
* [/raw-migrated-files/cloud/cloud-enterprise/ece-autoscaling.md](/raw-migrated-files/cloud/cloud-enterprise/ece-autoscaling.md)
70-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/xpack-autoscaling.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/xpack-autoscaling.md)
51+
* [Autoscaling in {{ece}} and {{ech}}](/deploy-manage/autoscaling/autoscaling-in-ece-and-ech.md)
52+
* [Autoscaling in {{eck}}](/deploy-manage/autoscaling/autoscaling-in-eck.md)
53+
* [Autoscaling deciders](/deploy-manage/autoscaling/autoscaling-deciders.md)
54+
* [Trained model autoscaling](/deploy-manage/autoscaling/trained-model-autoscaling.md)

deploy-manage/autoscaling/autoscaling-deciders.md

Lines changed: 203 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,216 @@ mapped_urls:
88
- https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-frozen-existence-decider.html
99
- https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-machine-learning-decider.html
1010
- https://www.elastic.co/guide/en/elasticsearch/reference/current/autoscaling-fixed-decider.html
11+
applies_to:
12+
ece:
13+
eck:
14+
ess:
1115
---
1216

13-
# Autoscaling deciders
17+
# Autoscaling deciders [autoscaling-deciders]
1418

15-
% What needs to be done: Refine
19+
[Autoscaling](/deploy-manage/autoscaling.md) in Elasticsearch enables dynamic resource allocation based on predefined policies. A key component of this mechanism is autoscaling deciders, which independently assess resource requirements and determine when scaling actions are necessary. Deciders analyze various factors, such as storage usage, indexing rates, and machine learning workloads, to ensure clusters maintain optimal performance without manual intervention.
1620

17-
% GitHub issue: https://github.com/elastic/docs-projects/issues/344
21+
::::{admonition} Indirect use only
22+
This feature is designed for indirect use by {{ech}}, {{ece}}, and {{eck}}. Direct use is not supported.
23+
::::
1824

19-
% Scope notes: Collapse to a single page, explain what deciders are
25+
[Reactive storage decider](#autoscaling-reactive-storage-decider)
26+
: Estimates required storage capacity of current data set. Available for policies governing data nodes.
2027

21-
% Use migrated content from existing pages that map to this page:
28+
[Proactive storage decider](#autoscaling-proactive-storage-decider)
29+
: Estimates required storage capacity based on current ingestion into hot nodes. Available for policies governing hot data nodes.
2230

23-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-deciders.md
24-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-reactive-storage-decider.md
25-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-proactive-storage-decider.md
26-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-shards-decider.md
27-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-storage-decider.md
28-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-existence-decider.md
29-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-machine-learning-decider.md
30-
% - [ ] ./raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-fixed-decider.md
31+
[Frozen shards decider](#autoscaling-frozen-shards-decider)
32+
: Estimates required memory capacity based on the number of partially mounted shards. Available for policies governing frozen data nodes.
3133

32-
⚠️ **This page is a work in progress.** ⚠️
34+
[Frozen storage decider](#autoscaling-frozen-storage-decider)
35+
: Estimates required storage capacity as a percentage of the total data set of partially mounted indices. Available for policies governing frozen data nodes.
3336

34-
The documentation team is working to combine content pulled from the following pages:
37+
[Frozen existence decider](#autoscaling-frozen-existence-decider)
38+
: Estimates a minimum require frozen memory and storage capacity when any index is in the frozen [ILM](../../manage-data/lifecycle/index-lifecycle-management.md) phase.
3539

36-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-deciders.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-deciders.md)
37-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-reactive-storage-decider.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-reactive-storage-decider.md)
38-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-proactive-storage-decider.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-proactive-storage-decider.md)
39-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-shards-decider.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-shards-decider.md)
40-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-storage-decider.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-storage-decider.md)
41-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-existence-decider.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-frozen-existence-decider.md)
42-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-machine-learning-decider.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-machine-learning-decider.md)
43-
* [/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-fixed-decider.md](/raw-migrated-files/elasticsearch/elasticsearch-reference/autoscaling-fixed-decider.md)
40+
[Machine learning decider](#autoscaling-machine-learning-decider)
41+
: Estimates required memory capacity based on machine learning jobs. Available for policies governing machine learning nodes.
42+
43+
[Fixed decider](#autoscaling-fixed-decider)
44+
: Responds with a fixed required capacity. This decider is intended for testing only.
45+
46+
## Reactive storage decider [autoscaling-reactive-storage-decider]
47+
48+
The [autoscaling](../../deploy-manage/autoscaling.md) reactive storage decider (`reactive_storage`) calculates the storage required to contain the current data set. It signals that additional storage capacity is necessary when existing capacity has been exceeded (reactively).
49+
50+
The reactive storage decider is enabled for all policies governing data nodes and has no configuration options.
51+
52+
The decider relies partially on using [data tier preference](../../manage-data/lifecycle/data-tiers.md#data-tier-allocation) allocation rather than node attributes. In particular, scaling a data tier into existence (starting the first node in a tier) will result in starting a node in any data tier that is empty if not using allocation based on data tier preference. Using the [ILM migrate](asciidocalypse://docs/elasticsearch/docs/reference/elasticsearch/index-lifecycle-actions/ilm-migrate.md) action to migrate between tiers is the preferred way of allocating to tiers and fully supports scaling a tier into existence.
53+
54+
## Proactive storage decider [autoscaling-proactive-storage-decider]
55+
56+
The [autoscaling](../../deploy-manage/autoscaling.md) proactive storage decider (`proactive_storage`) calculates the storage required to contain the current data set plus an estimated amount of expected additional data.
57+
58+
The proactive storage decider is enabled for all policies governing nodes with the `data_hot` role.
59+
60+
The estimation of expected additional data is based on past indexing that occurred within the `forecast_window`. Only indexing into data streams contributes to the estimate.
61+
62+
### Configuration settings [autoscaling-proactive-storage-decider-settings]
63+
64+
`forecast_window`
65+
: (Optional, [time value](asciidocalypse://docs/elasticsearch/docs/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) The window of time to use for forecasting. Defaults to 30 minutes.
66+
67+
68+
### {{api-examples-title}} [autoscaling-proactive-storage-decider-examples]
69+
70+
This example puts an autoscaling policy named `my_autoscaling_policy`, overriding the proactive decider’s `forecast_window` to be 10 minutes.
71+
72+
```console
73+
PUT /_autoscaling/policy/my_autoscaling_policy
74+
{
75+
"roles" : [ "data_hot" ],
76+
"deciders": {
77+
"proactive_storage": {
78+
"forecast_window": "10m"
79+
}
80+
}
81+
}
82+
```
83+
84+
The API returns the following result:
85+
86+
```console-result
87+
{
88+
"acknowledged": true
89+
}
90+
```
91+
92+
## Frozen shards decider [autoscaling-frozen-shards-decider]
93+
94+
The [autoscaling](../../deploy-manage/autoscaling.md) frozen shards decider (`frozen_shards`) calculates the memory required to search the current set of partially mounted indices in the frozen tier. Based on a required memory amount per shard, it calculates the necessary memory in the frozen tier.
95+
96+
### Configuration settings [autoscaling-frozen-shards-decider-settings]
97+
98+
`memory_per_shard`
99+
: (Optional, [byte value](asciidocalypse://docs/elasticsearch/docs/reference/elasticsearch/rest-apis/api-conventions.md#byte-units)) The memory needed per shard, in bytes. Defaults to 2000 shards per 64 GB node (roughly 32 MB per shard). Notice that this is total memory, not heap, assuming that the Elasticsearch default heap sizing mechanism is used and that nodes are not bigger than 64 GB.
100+
101+
## Frozen storage decider [autoscaling-frozen-storage-decider]
102+
103+
The [autoscaling](../../deploy-manage/autoscaling.md) frozen storage decider (`frozen_storage`) calculates the local storage required to search the current set of partially mounted indices based on a percentage of the total data set size of such indices. It signals that additional storage capacity is necessary when existing capacity is less than the percentage multiplied by total data set size.
104+
105+
The frozen storage decider is enabled for all policies governing frozen data nodes and has no configuration options.
106+
107+
### Configuration settings [autoscaling-frozen-storage-decider-settings]
108+
109+
`percentage`
110+
: (Optional, number value) Percentage of local storage relative to the data set size. Defaults to 5.
111+
112+
## Frozen existence decider [autoscaling-frozen-existence-decider]
113+
114+
The [autoscaling](../../deploy-manage/autoscaling.md) frozen existence decider (`frozen_existence`) ensures that once the first index enters the frozen ILM phase, the frozen tier is scaled into existence.
115+
116+
The frozen existence decider is enabled for all policies governing frozen data nodes and has no configuration options.
117+
118+
## Machine learning decider [autoscaling-machine-learning-decider]
119+
120+
The [autoscaling](../../deploy-manage/autoscaling.md) {{ml}} decider (`ml`) calculates the memory and CPU requirements to run {{ml}} jobs and trained models.
121+
122+
The {{ml}} decider is enabled for policies governing `ml` nodes.
123+
124+
::::{note}
125+
For {{ml}} jobs to open when the cluster is not appropriately scaled, set `xpack.ml.max_lazy_ml_nodes` to the largest number of possible {{ml}} nodes (refer to [Advanced machine learning settings](asciidocalypse://docs/elasticsearch/docs/reference/elasticsearch/configuration-reference/machine-learning-settings.md#advanced-ml-settings) for more information). In {{ess}}, this is automatically set.
126+
::::
127+
128+
129+
### Configuration settings [autoscaling-machine-learning-decider-settings]
130+
131+
Both `num_anomaly_jobs_in_queue` and `num_analytics_jobs_in_queue` are designed to delay a scale-up event. If the cluster is too small, these settings indicate how many jobs of each type can be unassigned from a node. Both settings are only considered for jobs that can be opened given the current scale. If a job is too large for any node size or if a job can’t be assigned without user intervention (for example, a user calling `_stop` against a real-time {{anomaly-job}}), the numbers are ignored for that particular job.
132+
133+
`num_anomaly_jobs_in_queue`
134+
: (Optional, integer) Specifies the number of queued {{anomaly-jobs}} to allow. Defaults to `0`.
135+
136+
`num_analytics_jobs_in_queue`
137+
: (Optional, integer) Specifies the number of queued {{dfanalytics-jobs}} to allow. Defaults to `0`.
138+
139+
`down_scale_delay`
140+
: (Optional, [time value](asciidocalypse://docs/elasticsearch/docs/reference/elasticsearch/rest-apis/api-conventions.md#time-units)) Specifies the time to delay before scaling down. Defaults to 1 hour. If a scale down is possible for the entire time window, then a scale down is requested. If the cluster requires a scale up during the window, the window is reset.
141+
142+
143+
### {{api-examples-title}} [autoscaling-machine-learning-decider-examples]
144+
145+
This example creates an autoscaling policy named `my_autoscaling_policy` that overrides the default configuration of the {{ml}} decider.
146+
147+
```console
148+
PUT /_autoscaling/policy/my_autoscaling_policy
149+
{
150+
"roles" : [ "ml" ],
151+
"deciders": {
152+
"ml": {
153+
"num_anomaly_jobs_in_queue": 5,
154+
"num_analytics_jobs_in_queue": 3,
155+
"down_scale_delay": "30m"
156+
}
157+
}
158+
}
159+
```
160+
161+
The API returns the following result:
162+
163+
```console-result
164+
{
165+
"acknowledged": true
166+
}
167+
```
168+
169+
## Fixed decider [autoscaling-fixed-decider]
170+
171+
::::{warning}
172+
This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
173+
::::
174+
175+
176+
::::{warning}
177+
The fixed decider is intended for testing only. Do not use this decider in production.
178+
::::
179+
180+
181+
The [autoscaling](../../deploy-manage/autoscaling.md) `fixed` decider responds with a fixed required capacity. It is not enabled by default but can be enabled for any policy by explicitly configuring it.
182+
183+
### Configuration settings [_configuration_settings]
184+
185+
`storage`
186+
: (Optional, [byte value](asciidocalypse://docs/elasticsearch/docs/reference/elasticsearch/rest-apis/api-conventions.md#byte-units)) Required amount of node-level storage. Defaults to `-1` (disabled).
187+
188+
`memory`
189+
: (Optional, [byte value](asciidocalypse://docs/elasticsearch/docs/reference/elasticsearch/rest-apis/api-conventions.md#byte-units)) Required amount of node-level memory. Defaults to `-1` (disabled).
190+
191+
`processors`
192+
: (Optional, float) Required number of processors. Defaults to disabled.
193+
194+
`nodes`
195+
: (Optional, integer) Number of nodes to use when calculating capacity. Defaults to `1`.
196+
197+
198+
### {{api-examples-title}} [autoscaling-fixed-decider-examples]
199+
200+
This example puts an autoscaling policy named `my_autoscaling_policy`, enabling and configuring the fixed decider.
201+
202+
```console
203+
PUT /_autoscaling/policy/my_autoscaling_policy
204+
{
205+
"roles" : [ "data_hot" ],
206+
"deciders": {
207+
"fixed": {
208+
"storage": "1tb",
209+
"memory": "32gb",
210+
"processors": 2.3,
211+
"nodes": 8
212+
}
213+
}
214+
}
215+
```
216+
217+
The API returns the following result:
218+
219+
```console-result
220+
{
221+
"acknowledged": true
222+
}
223+
```

0 commit comments

Comments
 (0)