The page has been translated by Gen AI.

Managing Policies

The number of servers in an Auto-Scaling Group can be dynamically adjusted based on monitoring metrics. When the set threshold is exceeded based on the monitoring metrics, the number of servers is adjusted. At this time, you can choose one of three ways to adjust the number of servers: increase or decrease the number of servers by a specified number, increase or decrease the number of servers by a specified ratio, or fix the number of servers to a specified value. When a server is started or terminated due to a policy, the monitoring metric, such as CPU usage, may temporarily exceed the threshold set in the policy. However, since this is a temporary moment, a cooldown time is set so that it is not judged as an abnormal situation. You can add and manage policies for an Auto-Scaling Group created in the Samsung Cloud Platform Console.

Adding a Policy

You can add a policy to an Auto-Scaling Group. To add a policy to an Auto-Scaling Group, follow these steps:

  1. All Services > Compute > Virtual Server menu, click. Move to the Service Home page of Virtual Server.

  2. Click the Auto-Scaling Group menu. Move to the Auto-Scaling Group List page.

  3. On the Auto-Scaling Group List page, click the resource to view detailed information. Move to the Auto-Scaling Group Details page.

  4. Click the Policy Tab. Move to the Policy Tab page.

  5. Click the Add Policy button. The Add Policy popup window opens.

    Classification
    Required
    Detailed Description
    ClassificationRequiredPolicy classification
    • Scale In: Server reduction
    • Scale Out: Server increase
    Policy NameRequiredPolicy name for distinction
    Execution ConditionRequiredCondition for executing the policy
    • Statistic: Method of calculating the metric type
      • Average: Average of servers in the Auto-Scaling Group
      • Min: Minimum value among servers in the Auto-Scaling Group
      • Max: Maximum value among servers in the Auto-Scaling Group
    • Metric Type: CPU Usage, Memory Usage, Network In(bytes), Network Out(bytes), Network In(Packets), Network Out(Packets)
      • Note: Memory usage policy is not available for Windows servers
    • Operator: >= > <= <
    • Threshold: Threshold for the metric type
    • Period: Continuous time to trigger the execution condition (N minutes)
    Execution UnitRequiredMethod of executing the policy
    • Policy Type: Select the type of policy to execute.
      • Increase or decrease the number of servers by a specified number: Increase or decrease the target value
      • Increase or decrease the number of servers by a specified ratio: Increase or decrease the target value ratio
      • Fix the number of servers to a specified value: Fix the target value
    • Target Value: Number or ratio to execute the selected Policy Type
    CooldownRequiredTime to wait (in seconds) when a server is started or terminated due to a policy
    • Default value is 300 seconds, and it can be set between 60 seconds and 3,600 seconds.
    Table. Add Policy Popup Items
    Note

    Policy > Cooldown Setting

    • When a server is started or terminated due to a policy, wait for the cooldown time set. The monitoring metric, such as CPU usage, may temporarily exceed the threshold set in the policy. However, since this is a temporary moment and not a condition for adjusting the number of servers, the cooldown time is set to wait.
    Guide

    Policy execution operates within the set minimum and maximum number of servers.

    • Even if the number of servers is increased or decreased, or fixed, beyond the minimum and maximum number of servers, it operates within the set minimum and maximum number of servers.
    • Example: If the minimum number of servers is 3, even if the number of servers is fixed to 1, the number of servers will not decrease to 1, but will be maintained at the minimum number of servers, which is 3.

  6. In the Add Policy popup window, enter the required values and click the Confirm button. The added policy can be checked in the Policy List.

Policy Creation Example

The following is an explanation of the policy example. Refer to it when creating a policy.

Policy Example Explanation 1
ClassificationExecution ConditionExecution UnitCooldown
Scale OutAverage CPU Usage >= 60% for 1 minuteIncrease the number of servers by a specified number, 1 server300 seconds
Table. Auto-Scaling Group Policy Example 1
  • If the average CPU usage of the servers in the Auto-Scaling Group is 60% or higher for 1 minute, 1 server is added.
  • When a server is added, the cooldown time is 300 seconds. During the cooldown time, no additional servers are added or terminated due to the policy.
  • After the cooldown time ends, the policy execution condition is checked again.
Policy Example Explanation 2
ClassificationExecution ConditionExecution UnitCooldown
Scale InMin CPU Usage <= 5% for 1 minuteDecrease the number of servers by a specified ratio, 50%300 seconds
Table. Auto-Scaling Group Policy Example 2
  • If the minimum CPU usage of the servers in the Auto-Scaling Group is 5% or lower for 1 minute, 50% of the current number of servers are terminated.
  • When a server is terminated, the cooldown time is 300 seconds. During the cooldown time, no additional servers are added or terminated due to the policy.
  • After the cooldown time ends, the policy execution condition is checked again.
Policy Example Explanation 3
ClassificationExecution ConditionExecution UnitCooldown
Scale OutMax CPU Usage >= 90% for 1 minuteFix the number of servers to a specified value, 5 servers300 seconds
Table. Auto-Scaling Group Policy Example 3
  • If the maximum CPU usage of the servers in the Auto-Scaling Group is 90% or higher for 1 minute, the number of servers is fixed to 5.
  • During the server creation, the cooldown time is 300 seconds. During the cooldown time, no additional servers are added or terminated due to the policy.
  • After the cooldown time ends, the policy execution condition is checked again.

Modifying a Policy

You can modify a policy of an Auto-Scaling Group. To modify a policy of an Auto-Scaling Group, follow these steps:

  1. All Services > Compute > Virtual Server menu, click. Move to the Service Home page of Virtual Server.

  2. Auto-Scaling Group menu should be clicked. It moves to the Auto-Scaling Group list page.

  3. In the Auto-Scaling Group list page, click on the resource to check the detailed information. It moves to the Auto-Scaling Group details page.

  4. Click on the Policy tab. It moves to the Policy tab page.

  5. Click on the More > Edit button of the policy to be modified. The Policy modification popup opens.

    Classification
    Required
    Detailed Description
    ClassificationRequiredPolicy classification
    • Scale In: Server count return
    • Scale Out: Server count increase
    Policy NameRequiredPolicy name for distinction
    Execution ConditionRequiredCondition for executing the policy
    • Statistic: Method of calculating Metric Type
      • Average: Average of servers in Auto-Scaling Group
      • Min: Minimum value among servers in Auto-Scaling Group
      • Max: Maximum value among servers in Auto-Scaling Group
    • Metric Type: CPU Usage, Memory Usage, Network In(bytes), Network Out(bytes), Network In(Packets), Network Out(Packets)
      • Note: Memory usage policy cannot be set for Windows servers
    • Operator: >= > <= <
    • Threshold: Threshold corresponding to Metric Type
    • Period: Continuous time (N minutes) to trigger the execution condition
    Execution UnitRequiredMethod of executing the policy
    • Policy Type: Select the type of policy to be executed.
      • Increase or decrease the server count by a specified number: Increase or decrease the server count by the target value
      • Increase or decrease the server count by a specified ratio: Increase or decrease the server count by the target value ratio
      • Fix the server count to the input value: Fix the server count to the target value
    • Target Value: The number or ratio of the selected Policy Type to be executed
    CooldownRequiredWaiting time (in seconds) when a server is started or terminated due to a policy
    • Default value is 300 seconds, and it can be set from 1 second to a maximum of 3,600 seconds
    Table. Policy modification popup items

  6. Click the Confirm button after entering the required values in the Policy modification popup window.

Policy Addition and Modification Restrictions

There are restrictions when adding or modifying policies, depending on the policy classification, execution condition, and execution condition range. Refer to the examples of restrictions below and add or modify policies accordingly.

Example 1 - Check for duplicate registration of policy classification and execution condition

Duplicate registration is not allowed when the policy classification (Scale Out or Scale In) and execution condition (Metric type) are the same.

Policy ClassificationPolicy NameExecution Condition (Statistic)Execution Condition (Metric Type)Execution Condition Range
Scale OutScaleOutPolicyAverageCPU Usage>= 60%
Table. Policy restriction example 1 - Pre-registered policy

If a policy is already registered as shown above, it is not possible to add or modify a policy with the same classification (Scale Out) and execution condition (Metric type = CPU Usage).

Example 2 - Check the execution condition range for the same execution condition (Metric type) and execution condition (Statistic)

When the policy distinction (Scale Out or Scale In) is different, the execution condition range (Comparison operator + Threshold) cannot be duplicated for the same execution condition (Metric type) and execution condition (Statistic).

Policy DistinctionPolicy NameExecution Condition (Statistic)Execution Condition (Metric type)Execution Condition Range
Scale OutScaleOutPolicyAverageCPU Usage>= 60%
Table. Policy Constraint Example 2 - Pre-registered Policy

In the case where a policy is registered as above, it is not possible to add a policy or modify it as follows: If the CPU Usage is 60% or higher on average, since the Scale Out policy is already registered, it is not possible to register a Scale In policy for CPU Usage average of 60% or lower, as the 60% case would be a duplicate of the same execution condition.

Policy DistinctionPolicy NameExecution Condition (Statistic)Execution Condition (Metric type)Execution Condition Range
Scale InAddUpdatePolicyAverageCPU Usage<= 60%
Table. Policy Constraint Example 2 - Policy that cannot be added

If a policy is already registered as shown above, it is not possible to add or modify a policy with the same execution condition (Metric type = CPU Usage) and execution condition (Statistic = Average), and an execution condition range that overlaps with the existing policy.

Example 3 - Check the execution condition range for the same execution condition (Metric type) and execution condition (Statistic)

When the policy distinction (Scale Out or Scale In) is different, the execution condition range (Comparison operator + Threshold) cannot be duplicated for the same execution condition (Metric type) and execution condition (Statistic).

Policy DistinctionPolicy NameExecution Condition (Statistic)Execution Condition (Metric type)Execution Condition Range
Scale InScaleInPolicyAverageCPU Usage<= 10%
Table. Policy Constraint Example 3 - Pre-registered Policy

In the case where a policy is registered as above, it is not possible to add or modify a policy as follows: Since the Scale In policy is already registered when the CPU usage is 10% or less on average, it is not possible to register a Scale Out policy when the CPU usage is less than 60%, less than or equal to 60%, greater than 10%, or greater than 9%.

Policy DistinctionPolicy NameExecution Condition (Statistic)Execution Condition (Metric type)Execution Condition Range
Scale OutAddUpdatePolicy1AverageCPU Usage< 60%
Scale OutAddUpdatePolicy2AverageCPU Usage<= 60%
Scale OutAddUpdatePolicy3AverageCPU Usage>= 10%
Scale OutAddUpdatePolicy4AverageCPU Usage> 9%
Table. Policy Constraint Example 3 - Policies that cannot be added

Example 4 - Registration is possible when the execution condition range does not overlap

When the policy distinction (Scale Out or Scale In) is different, it is possible to register even if the execution condition (Statistic) is different or the execution condition range (Comparison operator + Threshold) does not overlap for the same execution condition (Metric type).

Policy DistinctionPolicy NameExecution Condition (Statistic)Execution Condition (Metric type)Execution Condition Range
Scale OutScaleOutPolicyAverageCPU Usage>= 60%
Table. Policy constraint example 4 - Pre-registered policy

In the case where a policy is registered as above, it is possible to add or modify a policy as follows. If the execution condition range does not overlap or the execution condition (Statistic) is different, registration is possible.

Policy DistinctionPolicy NameExecution Condition (Statistic)Execution Condition (Metric type)Execution Condition Range
Scale InAddUpdatePolicy1AverageCPU Usage<= 10%
Scale InAddUpdatePolicy2MinCPU Usage<= 60%
Table. Policy constraint example 4 - Policies that can be added

Deleting a Policy

It is possible to delete a policy from an Auto-Scaling Group. To delete a policy, follow the procedure below.

  1. All Services > Compute > Virtual Server menu, click. Move to the Service Home page of Virtual Server.
  2. Auto-Scaling Group menu, click. Move to the Auto-Scaling Group List page.
  3. On the Auto-Scaling Group List page, click the resource to check the detailed information. Move to the Auto-Scaling Group Details page.
  4. Click the Policy Tab. Move to the Policy Tab page.
  5. Select the policy to delete and click the Delete button. The Policy Delete Confirmation popup window opens.
  6. Confirm the Policy Delete Confirmation popup window and click the Confirm button.
Launch Configuration
Managing Schedules