Auto-scaling Policy Resource Definition
An auto-scaling policy defines the threshold values pertaining to scaling up and scaling down decisions. Autoscaler will refer to the auto-scaling policy that is defined by DevOps. A sample auto-scaling policy definition, together with information on all the properties that can be added in an auto-scaling policy definition JSON are as follows:
Sample auto-scaling policy definition JSON
The following are sample configurations that can be used to define an auto-scaling policy:
{ "id": "autoscaling-policy-1", "loadThresholds": { "requestsInFlight": { "threshold": 20 }, "memoryConsumption": { "threshold": 80 }, "loadAverage": { "threshold": 120 } } }
Property definitions
All the properties that correspond to the auto-scaling resource are explained as follows:Â
|
|
|
|
|
Main property definitions
Property | W | R | U | Description | M | DV | Data Type | Example | |
---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||
| Auto Scale policy ID | √ | √ |  | Unique ID of the autoscaling policy | Yes | N/A | String | economy |
|  | √ | √ |  |  | No | N/A | String |  |
description | Description | √ | √ |  | A summarized description of the auto-scaling policy | No | N/A | String | Values for economy auto-scaling policy. |
| Load Thresholds | √ | √ |  | The autoscaling load threshold is determined based on the requests in flight, memory consumption, and load average. For more information on the sub-properties, see loadThresholds. | Yes | N/A | LoadThresholds | N/A |
Sub-property definitions
loadThresholds
Property | W | R | U | Description | M | DV | Data Type | |
---|---|---|---|---|---|---|---|---|
JSON | UI | |||||||
requestsInFlight | Requests In Flight | √ | √ |  | The number of requests the load balancer received, but are yet to be processed. For more information on the sub-properties, see requestsInFlight. This property is only required if the deployed cartridge is using a load balancer. | No | N/A | requestsInFlight |
| Memory Consumption | √ | √ |  | The memory usage of a cartridge process, which is considered as a percentage of the total available RAM. This is a percentage and cannot go beyond 100, since a process cannot take more than total physical memory. For more information on the sub-properties, see memoryConsumption. The formula used to calculate this is: In the above formula, | Yes | N/A | memoryConsumption |
loadAverage | Load Average | √ | √ |  | The average system load over a period of time. (System load is a measure of the amount of computational work that a computer system performs.) This a percentage and it can go beyond 100%. For more information on the sub-properties, see loadAverage. The formula used to calculate this is: In the above formula, | Yes | N/A | loadAverage |
requestsInFlight
Property | W | R | U | Description | M | DV | Data Type | Example | |
---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||
threshold | Threshold | √ | √ |  | The maximum requests in-flight limit. | No | N/A | Float | 30 |
memoryConsumption
Property | W | R | U | Description | M | DV | Data type | Example | |
---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||
threshold |  Threshold | √ | √ |  | The maximum memory usage limit. | No | N/A | Float | 80 |
loadAverage
Property | W | R | U | Description | M | DV | Data Type | Example | |
---|---|---|---|---|---|---|---|---|---|
JSON | UI | ||||||||
|  Threshold | √ | √ |  | The maximum limit of an average system load over a period of time. | Yes | N/A | Float | 100 |