Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Table of Contents
maxLevel3

Sample auto-scaling policy definition JSON

The following are sample configurations that can be used to define an auto-scaling policy:

Excerpt
Code Block
{
  "id": "autoscaling-policy-1",
  "loadThresholds": {
    "requestsInFlight": {
      "threshold": 50
    },
    "memoryConsumption": {
      "threshold": 40
    },
    "loadAverage": {
      "threshold": 40
    }
  }
}

Property definitions

All the properties that correspond to the auto-scaling resource are explained as follows: 

Main property definitions

PropertyImage AddedImage AddedImage AddedDescriptionImage AddedImage AddedData
Type 
Example
JSONUI

Anchor
id
id
id

Auto Scale policy ID Unique ID of the autoscaling policyYesN/AString

economy

Anchor
displayName
displayName
displayName

   NoN/AString 
Anchor
description
description
description
Description A summarized description of the auto-scaling policyNoN/AStringValues for economy auto-scaling policy.

Anchor
loadThresholds1
loadThresholds1
loadThresholds

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.YesN/ALoadThresholdsN/A

Sub-property definitions

loadThresholds
PropertyImage AddedImage AddedImage AddedDescriptionImage AddedImage AddedData Type
JSONUI
Anchor
requestsInFlight1
requestsInFlight1
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.

Info

This property is only required if the deployed cartridge is using a load balancer.

NoN/ArequestsInFlight

memoryConsumption 

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.

Info

The formula used to calculate this is: ((usedMemory - cachedMemory)/totalMemory)*100

In the above formula, usedMemory refers to the amount of current memory usage, cachedMemory refers to the amount of memory available in the Cache and totalMemory refers to the total amount of memory available in the instance used.

YesN/AmemoryConsumption
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.

Info

The formula used to calculate this is: (loadAvg/cores)*100

In the above formula, loadAvg refers to the load average of the instance and cores refers to the number of CPU cores of the instance.

YesN/AloadAverage
requestsInFlight
PropertyImage AddedImage AddedImage AddedDescriptionImage AddedImage AddedData
Type
Example
JSONUI
Anchor
threshold1
threshold1
threshold
Threshold The maximum requests in-flight limit.NoN/AFloat

30

memoryConsumption
PropertyImage AddedImage AddedImage AddedDescriptionImage AddedImage AddedData
type 
Example
JSONUI
Anchor
threshold2
threshold2
threshold
 Threshold The maximum memory usage limit.NoN/AFloat

80

loadAverage
PropertyImage AddedImage AddedImage AddedDescriptionImage AddedImage AddedData
Type
Example
JSONUI

Anchor
threshold3
threshold3
threshold

 Threshold The maximum limit of an average system load over a period of time.YesN/AFloat

100