Automatic Expansion
Overview
After the application is deployed, the automatic expansion function can be enabled (currently, only stateless applications are supported). Applications that enable automatic expansion can automatically monitor the number of instances of running status change of the application and achieve a more reasonable application of resources.
Automatic expansion strategy
Expansion by rules
Expansion by rules can be based on an application's metrics being expanded, the following are the meaning of each parameter:
- Instance number range. Specifies the minimum number of instances and the maximum number of instances allowed by the application during automatic expansion
- Cycle interval: how often the automatic expansion program checks the application status
- Metric: supports CPU, memory, response time
- Domain name: if you select QPS (response time) for the metric, you need to select this parameter. Select the corresponding parameter for this application. Otherwise, automatic expansion does not take effect. One can only select domain names that have already been created in the app
- Cycle: threshold of metric arriving at conditions
Expansion by plan
Expansion by rules under certain sudden traffic is not good, and expansion by plan then occurs. You can select a repeat plan or a single plan. When the time period is specified, the automatic expansion system adjusts the corresponding number of instances.
How to handle multiple expansion strategy conflicts
If there are multiple automatic expansion policies in an application and these policies take effect at the same time, the automatic expansion system will execute the policy that retains the maximum number of instances after the policy is executed.
For example, if the number of current instances of an application A is 5, it has two expansion policies. The expansion of policy A is by rules and requires one instance to be reduced. The expansion of strategy B is by plan and requires two instances to be added. Finally, the system implements strategy B.
Automatic expansion template
You can create some automatic expansion templates in advance and apply them directly to the application when you use them.
How to use
Select a template, select multiple applications in the usage strategy, and click Submit. Or in the application details, click Create Strategy and you can select a strategy template, and then click Submit.
Automatic expansion history
In the application's Instance Information field, click History and you can view the record of the automatic expansion strategy's adjustment of the number of instances of the application program; historical records are saved for 7 days.