Creating a Bandwidth Scaling Policy¶
Scenarios¶
You can automatically adjust your purchased EIP bandwidth and shared bandwidth using a bandwidth scaling policy. This section describes how to create a bandwidth scaling policy.
When creating a bandwidth scaling policy, you need to configure basic information. The system supports three types of bandwidth scaling policies: alarm-based, scheduled, and periodic.
The basic information for creating a bandwidth scaling policy includes the policy name, policy type, and trigger condition.
Creating an Alarm-based Bandwidth Scaling Policy¶
Log in to the management console.
Click in the upper left corner to select a region and a project.
Under Computing, click Auto Scaling. In the navigation pane on the left, choose Bandwidth Scaling.
Click Create Bandwidth Scaling Policy.
Set parameters, such as the policy name, policy type, and trigger condition. For details, see Table 1.
¶ Parameter
Description
Example Value
Region
Specifies the region where the AS group resides.
-
Policy Name
Specifies the name of the bandwidth scaling policy.
The name consists of only letters, digits, underscores (_), and hyphens (-).
-
EIP
Specifies the public network IP address whose bandwidth needs to be scaled.
-
Policy Type
Select Alarm.
Alarm
Alarm Rule
You can use an existing alarm rule or create a new one.
To create an alarm rule, configure the following parameters:
Rule Name
Specifies the name of the new alarm rule, for example, as-alarm-7o1u.
Trigger Condition
Select a monitoring metric and trigger condition based on the metric. Table 2 lists the supported monitoring metrics. An example value is Outbound Bandwidth Avg. > 100 bit/s.
Monitoring Interval
Specifies the monitoring period for the metric, for example, 5 minutes.
Consecutive Occurrences
Specifies the number of consecutive periods in which the triggering condition is met for triggering a scaling action.
-
Scaling Action
Specifies the execution action in the AS policy.
The following scaling action options are available:
Add
When a scaling action is triggered, the bandwidth is increased.
Reduce
When a scaling action is triggered, the bandwidth is decreased.
Set to
The bandwidth is set to a fixed value.
Note
The step (minimum unit for bandwidth adjustment) varies depending on the bandwidth value range. The bandwidth will be automatically adjusted to the nearest value according to the actual step.
If the bandwidth is less than or equal to 300 Mbit/s, the default step is 1 Mbit/s.
If the bandwidth ranges from 300 Mbit/s to 500 Mbit/s, the default step is 50 Mbit/s.
-
Cooldown Period
A cooldown period (in seconds) is the period of time between two scaling actions. AS recounts the cooldown period after a scaling action is complete. During the cooldown period, AS denies all scaling requests triggered by alarm-based policies. Scaling requests triggered manually or by scheduled or periodic policies are not affected.
300s
¶ Metric
Description
Inbound Bandwidth
Indicates the network rate of inbound traffic.
Inbound Traffic
Indicates the network traffic going into the cloud platform.
Outbound Bandwidth
Indicates the network rate of outbound traffic.
Outbound Traffic
Indicates the network traffic going out of the cloud platform.
After setting the parameters, click Create Now.
The newly created bandwidth scaling policy is displayed on the Bandwidth Scaling page and is in Enabled state by default.
Creating a Scheduled or Periodic Bandwidth Scaling Policy¶
Log in to the management console.
Click in the upper left corner to select a region and a project.
Under Computing, click Auto Scaling. In the navigation pane on the left, choose Bandwidth Scaling.
Click Create Bandwidth Scaling Policy.
Set parameters, such as the policy name, policy type, and trigger condition. For details, see Table 3.
¶ Parameter
Description
Example Value
Region
Specifies the region where the AS group resides.
-
Policy Name
Specifies the name of the bandwidth scaling policy.
The name consists of only letters, digits, underscores (_), and hyphens (-).
as-policy-p6g5
EIP
Specifies the public network IP address whose bandwidth needs to be scaled.
-
Policy Type
Specifies the policy type. You can select a scheduled or periodic policy.
If you select Periodic, you are required to configure two more parameters:
Time Range
Specifies the time range during which the AS policy can be triggered.
Period
Day
Week
Month
-
Triggered At
Specifies the time at which the AS policy is triggered.
-
Scaling Action
Specifies the action to be performed.
The following scaling action options are available:
Add
When a scaling action is triggered, the bandwidth is increased.
Reduce
When a scaling action is triggered, the bandwidth is decreased.
Set to
The bandwidth is set to a fixed value.
Note
The step (minimum unit for bandwidth adjustment) varies depending on the bandwidth value range. The bandwidth will be automatically adjusted to the nearest value according to the actual step.
If the bandwidth is less than or equal to 300 Mbit/s, the default step is 1 Mbit/s.
If the bandwidth ranges from 300 Mbit/s to 500 Mbit/s, the default step is 50 Mbit/s.
-
Cooldown Period
A cooldown period (in seconds) is the period of time between two scaling actions. AS recounts the cooldown period after a scaling action is complete. During the cooldown period, AS denies all scaling requests triggered by alarm-based policies. Scaling requests triggered manually or by scheduled or periodic policies are not affected.
300s
After setting the parameters, click Create Now.