Configure Elastic Plans
An elastic plan supports two modes. Time-based Scaling scales the cluster in and out on a recurring schedule during the time periods that you specify, which suits scenarios with predictable peak hours. Metric-based Scaling scales the cluster in and out based on the actual load of the cluster, which suits scenarios with irregular traffic fluctuations. This topic describes how to create and manage elastic plans and how to view plan execution results.
Limits
When you create or update an elastic plan, the instance and the plan configuration must meet the requirements listed in the following table.
| Category | Description |
| Elastic target | Only data node elasticity is supported. |
| Version of the cluster | Only clusters of versions 7.10, 8.17, and 9.4 are supported, and the cluster must have the Openstore storage-compute separation (high-performance retrieval) feature enabled. |
| Instance architecture | The instance must have data nodes, dedicated master nodes, and client nodes. |
| Available regions | The primary zone of the cluster must be within the following: Zone B/J/K in China (Hangzhou); Zone B/C/D in China (Hong Kong); Zone K/F/I in China (Beijing); Zone E/G/L in China (Shanghai); Zone C/D/E in China (Shenzhen); Zone B/C in China (Zhangjiakou). |
| Resource utilization | The recent resource utilization of the instance must be within the healthy range: CPU and disk utilization must not exceed 75%, average heap utilization must not exceed 75%, and peak heap utilization must not exceed 85%. If cluster metrics exceed the thresholds, elastic plans cannot be created temporarily. |
| Master node specifications | The dedicated master node specifications must support the data node scale after the scale-out. The total master node specifications must meet the following minimums:
|
| Target capacity | The target number of nodes per zone cannot be zero and cannot exceed three times the baseline node count. See the parameter tables in Create an elastic plan for details. |
| Time period (time-based scaling only) | The start time and time zone cannot be modified while the plan is active. For the other time period rules, see the Time Period parameter in Create an elastic plan. |
| Specific date (time-based scaling only) | The execution date rules for a one-time plan are described in the Recurrence parameter (Once option) in Create an elastic plan. |
| Plan count | You can create a maximum of 5 elastic plans for a single instance, of which at most 1 can be a Auto Scaling plan. |
Create an elastic plan
Elastic plans use the pay-as-you-go billing method. You are charged only for the elastic nodes that are actually delivered during plan execution, and these charges are calculated separately from the costs of the original baseline specifications of the instance. For more information about the billing rules, see Billing of elastic plans.
The data nodes that exist before an elastic plan runs are called baseline nodes, and the additional data nodes that are allocated during plan execution are called elastic nodes. You choose an elastic mode when you create a plan, and the elastic mode cannot be modified after the plan is created. Compare the two modes before you create a plan.
| Item | Time-based Scaling | Metric-based Scaling |
| Applicable scenario | Predictable peak hours | Irregular traffic fluctuations |
| Time window | Requires a Time Period and a Recurrence | No time period is required |
| Capacity parameter | Target Data Nodes per Zone (a fixed target) | Maximum Elastic Nodes per Zone (an upper limit) |
| Master node check | Based on the data node scale after the scale-out | Based on the sum of the baseline nodes and the maximum elastic nodes |
Log on to the Alibaba Cloud Elasticsearch console.
In the left-side navigation pane, click Elasticsearch Clusters, select the region where the instance resides at the top, and then click the ID of the target instance.
In the left-side navigation pane, choose Configuration and Management > Scaling Plans.
On the Scaling Plans tab, click Create Scaling Plan.
In the Create Scaling Plan panel, configure the following parameters, and then click OK.
| Parameter | Applicability | Description |
| Plan Name | All modes | The name of the plan. The name must be unique within the same instance, can contain only lowercase letters, digits, and hyphens, and can be up to 64 characters in length. |
| Description | All modes | The description of the plan. The description can be up to 256 characters in length. |
| Elastic Mode | All modes | The method that triggers the scaling of the plan. The elastic mode cannot be modified after the plan is created.
|
| Time Period | Time-based only | The start time and end time during which the plan takes effect. Both are set on the hour. The end time must be later than the start time and can be set to 24:00 of the current day at the latest. |
| Recurrence | Time-based only | The execution cycle of the plan.
|
| Target Data Nodes per Zone | Time-based only | The target number of data nodes to which each zone scales out when the plan takes effect. |
| Elastic Node Specifications | All modes | Read-only. The specifications of the elastic nodes that are actually allocated are the same as the specifications of the current data nodes, so you do not need to configure this parameter. |
The following parameters apply only to Elastic Mode = Auto Scaling. Configure these parameters instead of the time period and the recurrence.
| Parameter | Description |
| Maximum Elastic Nodes per Zone | The maximum number of elastic nodes that each zone can scale out to. Set this value separately for each node type. The specifications of the elastic nodes are the same as the specifications of the current nodes of the corresponding type, so you do not need to select them. The value cannot exceed three times the number of baseline nodes of that type. If it does, the plan cannot be created. After you set the value, the console converts it by number of nodes × vCPUs per node and displays the corresponding elastic capacity (ECU). For example, if you set the upper limit to 3 for nodes with 8 vCPUs and 16 GB of memory, the elastic capacity is 24 ECU. |
| Trigger Metric | Only Target CPU Utilization is supported. Enter an integer percentage. After the scaling, the CPU utilization of the cluster stays around this target level. |
| Strategy Level | The sensitivity of the scaling. The default value is Balanced.
|
In metric-based scaling mode, the total number of data nodes is the sum of the number of baseline nodes and the maximum number of elastic nodes, and the dedicated master node specifications must meet the requirements for that total (see Master node specifications in Limits). If the requirements are not met, the create panel displays the current and the required dedicated master node specifications, and the OK button cannot be clicked. In this case, click Upgrade in the prompt to upgrade the dedicated master nodes first, or reduce the maximum number of elastic nodes.
After the plan is created, it appears in the list on the Scaling Plans tab, where you can view its Plan Name, Scaling Mode, Policy Summary, Enable, and Created At. The Policy Summary column shows different content depending on the elastic mode: time-based scaling shows the execution policy, the execution time, and the number of nodes per zone; metric-based scaling shows the target CPU utilization, the maximum number of data nodes, and the strategy level.
A newly created plan appears at the top of the list, which is sorted in descending order by creation time, and is enabled by default. The Enable column is a switch control. Click it to enable or disable the plan directly, without going to the details page.
Manage elastic plans
In the elastic plan list, you can perform the operations listed in the following table on a single plan. Enabling and disabling are performed by using the switch in the Enable column, while the View Details, Edit, and Delete operations are in the Actions column. You can also select one or more plans to perform batch operations.
Enable, disable, and delete all require a second confirmation in the dialog box that appears. The dialog boxes for disable and delete describe the impact of the operation, so read them before you confirm.
| Operation | Description |
| Enable | After the plan is enabled, it takes effect: time-based scaling runs according to the specified time period and recurrence, and metric-based scaling continuously monitors the trigger metric and scales the cluster in and out automatically. The switch in the Enable column turns on. |
| Disable | After the plan is disabled, it stops monitoring and triggering. If elastic nodes are running at that time, the system automatically scales the cluster back in to the baseline, and the elastic nodes are released gradually after they pass the safety check. Billing for elastic nodes continues normally during the release and stops after the release is complete. The configuration of the plan is retained, and you can re-enable the plan at any time. A disabled plan remains in the list and is not removed. |
| Edit | Modifies the plan configuration. The modification takes effect after it is complete. The elastic mode cannot be modified after the plan is created, and the time period and time zone cannot be modified while the plan is active. |
| Delete | The configuration cannot be recovered after the plan is deleted. An enabled plan cannot be deleted. Disable the plan first, and then delete it. After the plan is deleted, it is removed from the list. |
View plan details
In the Actions column of the elastic plan list, click View Details, or click the plan name directly, to go to the details page of that plan. The top of the details page shows the execution statistics, and the Plan Configuration area below shows the complete configuration of the plan. This page shows aggregated statistics for the current plan; for record-level history across all elastic plans of the instance, see View execution results.
The execution statistics include Executions and Failed Executions, which help you quickly determine whether the plan is working properly. Time-based scaling also shows the Next Execution time. The execution count here covers only the current plan.
The Status in the configuration area reflects the current running state of the plan: an enabled plan that is working according to its policy is shown as Running, and a plan that is turned off is shown as Disabled.
The configuration items shown on the details page differ between the two elastic modes.
| Elastic Mode | Configuration items displayed |
| Common to both modes | The plan name, plan description, status, elastic mode, creation time, and update time. If no plan description is provided, a hyphen is displayed. |
| Time-based Scaling | The execution policy (a combination of the recurrence and the time period, for example, Daily 14:00:00 - 17:00:00), node specifications, time zone offset, and target data nodes per zone. |
| Auto Scaling | The elastic target (the node types that participate in scaling, together with their current specifications and baseline counts), the maximum elastic limit (the number of elastic nodes and the converted ECU), the trigger metric, and the strategy level. |
The details page does not show node resource usage. To view the resource utilization during the scaling period, go to the Cluster Monitoring page and select Node Resource Metrics.
View execution results
When you need to confirm whether a plan has taken effect or troubleshoot why the capacity did not change as expected, check the execution history first. For aggregated statistics of a single plan, see View plan details. View the execution history:
On the elastic plan list page, click the Execution History tab.
View the Execution Time, Trigger Type, Action Type, and Delivery Status of each plan trigger. Execution records are retained for a maximum of 90 days; records older than 90 days are not displayed.
This tab shows the execution records of all elastic plans under the current instance, sorted in descending order by execution time. To troubleshoot a single plan, filter by plan name in the search box on the tab.
Trigger Type: Scheduled (time-based scaling is triggered by the time period), Metric Trigger (metric-based scaling is triggered by the metric), Manual Trigger, and System Triggered.
Action Type: Scale Out, Scale In, and No Change.
Delivery Status: except for All Delivered, all other values indicate that the scaling did not fully take effect. Use these values to locate the cause.
Partially Delivered and Out of Stock: the zone has insufficient resources and only part of the nodes were delivered. Try again later or reduce the target capacity.
Cluster status abnormal and Blocked by system (for example, the cluster is unhealthy): the cluster is not in a healthy or changeable state. Restore the cluster state first.
Blocked by user configuration (such as allocation constraints).: configurations of the cluster itself, such as shard allocation, blocked the node change. Check the related configurations.
Plan disabled by user: the plan has been disabled and no longer triggers.
Alternatively, you can view elastic plan events through Event Center. See System change events: in the left-side navigation pane of the Elasticsearch console, click Event Center, select System Change Events, and view events such as scale-out, scale-in, and execution exceptions that elastic plans trigger. An event shows the instance ID, event level, event status, event description, occurrence time, plan execution time, and execution end time.