Scaling policy
When creating an instance group, you can choose how to increase and decrease the number of instances in the group.
The policy is defined in the scale-policy
key in the YAML file.
fixed_scale
The fixed_scale
key defines a group of fixed-size instances. The size of the group is defined in the size
key. You can create a group with the desired number of instances within the available quotas and limits.
Example of a YAML file entry:
...
scale_policy:
fixed_scale:
size: 3
...
Keys:
Key | Value |
---|---|
fixed_scale |
A group of fixed-size instances. |
size * |
Number of instances in the group. Valid values are from 0 to 100. |
* Required field.
auto_scale
The auto_scale
key defines automatically scalable instance group. The initial size of the group is defined in the initial_size
key. You can create a group with the desired number of instances within the available quotas and limits.
Example of a YAML file entry:
scale_policy:
auto_scale:
initial_size: 5
max_size: 15
min_zone_size: 3
measurement_duration: 30
warmup_duration: 60
stabilization_duration: 120
cpu_utilization_rule:
utilization_target: 75
Keys:
Key | Value |
---|---|
auto_scale |
An automatically scaled instance group. |
initial_size * |
Initial number of instances in the group. Valid values are from 0 to 100. |
max_size |
Maximum number of instances in the group. Valid values are from 0 to 100. |
min_zone_size |
Minimum number of instances in one availability zone. Valid values are from 0 to 100. |
measurement_duration * |
Time in seconds allotted for averaging metrics based on CPU load. If the average load at the end of the interval is higher than cpu_utilization_rule.utilization_target , Instance Groups increases the number of instances in the group.Valid values are from 60 to 600 seconds. |
warmup_duration * |
The warmup time of the instance. During this time, traffic is sent to the instance, but CPU utilization metrics aren't considered. Valid values are from 0 to 600 seconds. |
stabilization_duration * |
The minimum amount of time to monitor CPU utilization before Instance Groups can reduce the number of instances in the group. During this time, the group is not resized, even if the average CPU utilization drops below the cpu_utilization_rule.utilization_target value.Valid values are from 60 to 1800 seconds. |
cpu_utilization_rule * |
Sets the target CPU utilization to run scaling based on the average CPU utilization in the instance group. |
utilization_target * |
Target CPU utilization to be supported by Instance Groups. If the average CPU utilization is below the target value, Instance Groups will reduce the number of instances until it reaches min_zone_size in each availability zone.If the average CPU utilization is higher than the target value, Instance Groups will create instances until it reaches max_size .Valid values are from 10 to 100. |
* Required field.