El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Creating an AS Policy

Updated on 2024-04-25 GMT+08:00

Scenarios

You can create different types of AS policies. In an AS policy, you can define the conditions for triggering a scaling action and what operation to be performed. When the conditions are met, AS automatically triggers a scaling action to adjust the number of instances in the AS group.

This section describes how to create alarm-based, scheduled, or periodic AS policy for an AS group.

Creating an Alarm Policy

  1. Log in to the management console.
  1. Under Computing, click Auto Scaling.
  2. Locate the row containing the target AS group and click View AS Policy in the Operation column.
  3. On the AS Policies page, click Add AS Policy.
  4. Set the parameters listed in Table 1.
    Table 1 AS policy parameters

    Parameter

    Description

    Example Value

    Policy Name

    Specifies the name of the AS policy to be created.

    as-policy-p6g5

    Policy Type

    Select Alarm.

    Alarm Policy

    Alarm Rule

    Specifies whether a new alarm rule is to be created (Create) or an existing alarm rule will be used (Use existing).

    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

      Specifies a monitoring metric and condition for triggering a scaling action. For example, when CPU Usage becomes higher than 70%, AS automatically triggers a scaling action.

    • Monitoring Interval

      Specifies the interval (such as five minutes) at which the alarm status is updated based on the alarm rule.

    • Consecutive Occurrences

      Specifies the number of sampling points when an alarm is triggered. If Consective Occurrences is set to n, the sampling points of the alarm rule are the sampling points in n consecutive sampling periods. Only if all the sampling points meet the threshold configured for the alarm rule will the alarm rule status be refreshed as the Alarm status.

    N/A

    Scaling Action

    Specifies an action and the number or percentage of instances.

    The following scaling action options are available:
    • Add

      Adds instances to an AS group when the scaling action is performed.

    • Reduce

      Removes instances from an AS group when the scaling action is performed.

    • Set to

      Sets the expected number of instances in an AS group to a specified value.

    • Add 1 instance
    • Add 10% instances
      The number of instances to be added is 10% of the current number of instances in the AS group. If the product of the current number of instances and the percentage is not an integer, AS automatically rounds the value up or down:
      • If the value is greater than 1, it is rounded down. For example, value 12.7 is rounded down to 12.
      • If the value is greater than 0 but less than 1, it is rounded up to 1. For example, value 0.67 is rounded up to 1.

      For example, suppose that there are 10 instances in an AS group, and the scaling action is Add 15% instances. When the AS policy is triggered, AS calculates the number of instances to be added is 1.5 and rounds 1.5 down to 1. After the scaling action is complete, there are 11 instances in the AS group.

    Cooldown Period

    To prevent an alarm-based policy from being repeatedly triggered by the same event, you can set a 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.

    For example, suppose that the cooldown period is set to 300 seconds (5 minutes), and a scheduled policy is specified to trigger a scaling action at 10:32, and a previous scaling action triggered by an alarm policy ends at 10:30. Any alarm-triggered scaling action will then be denied during the cooldown period from 10:30 to 10:35, but the scaling action scheduled for 10:32 will still take place. If the scheduled scaling action ends at 10:36, a new cooldown period starts at 10:36 and ends at 10:41.

    NOTE:
    • If a scaling action is triggered by an AS policy, the cooldown period is whatever configured for that AS policy.
    • If a scaling action is triggered by manually changing the expected number of instances or by other actions, the cooldown period is whatever configured for the AS group.
    • When an AS group scales out, scale-in requests triggered manually or by scheduled or periodic policies will be executed immediately after the scale-out is complete, without being affected by the cooldown period.
    • When an AS group scales in, scale-out requests triggered manually or by scheduled or periodic policies will be executed immediately after the scale-in is complete, without being affected by the cooldown period.

    300

  5. Click OK.

    The newly added AS policy is displayed on the AS Policies tab. In addition, the AS policy is in Enabled state by default.

Creating a Scheduled or Periodic Policy

  1. Log in to the management console.
  1. Under Computing, click Auto Scaling.
  2. Locate the row containing the target AS group and click View AS Policy in the Operation column.
  3. On the AS Policies page, click Add AS Policy.
  4. Configure the parameters listed in Table 2.
    Table 2 Parameter description

    Parameter

    Description

    Example Value

    Policy Name

    Specifies the name of the AS policy to be created.

    as-policy-p6g5

    Policy Type

    Select Scheduled or Periodic for expanding resources at a specified time.

    If you select Periodic, you are required to configure two more parameters:

    • Period
      • Day
      • Week
      • Month
    • Time Range

      Specifies the time range during which the AS policy can be triggered.

    N/A

    Time Zone

    The default value is GMT+08:00.

    GMT+08:00 is 8:00 hours ahead of Greenwich Mean Time.

    GMT+08:00

    Triggered At

    Specifies the time at which the AS policy is triggered.

    N/A

    Scaling Action

    Specifies an action and the number of instances.

    The following scaling action options are available:
    • Add

      Adds instances to an AS group when the scaling action is performed.

    • Reduce

      Removes instances from an AS group when the scaling action is performed.

    • Set to

      Sets the expected number of instances in an AS group to a specified value.

    • Add 1 instance
    • Add 10% instances

      The number of instances to be added is 10% of the current number of instances in the AS group. If the product of the current number of instances and the percentage is not an integer, AS automatically rounds the value up or down:

      • If the value is greater than 1, it is rounded down. For example, value 12.7 is rounded down to 12.
      • If the value is greater than 0 but less than 1, it is rounded up to 1. For example, value 0.67 is rounded up to 1.

    For example, suppose that there are 10 instances in an AS group, and the scaling action is Add 15% instances. When the AS policy is triggered, AS calculates the number of instances to be added is 1.5 and rounds 1.5 down to 1. After the scaling action is complete, there are 11 instances in the AS group.

    Cooldown Period

    To prevent an alarm-based policy from being repeatedly triggered by the same event, you can set a 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.

    For example, suppose that the cooldown period is set to 300 seconds (5 minutes), and a scheduled policy is specified to trigger a scaling action at 10:32, and a previous scaling action triggered by an alarm policy ends at 10:30. Any alarm-triggered scaling action will then be denied during the cooldown period from 10:30 to 10:35, but the scaling action scheduled for 10:32 will still take place. If the scheduled scaling action ends at 10:36, a new cooldown period starts at 10:36 and ends at 10:41.

    NOTE:
    • If a scaling action is triggered by an AS policy, the cooldown period is whatever configured for that AS policy.
    • If a scaling action is triggered by manually changing the expected number of instances or by other actions, the cooldown period is whatever configured for the AS group.
    • When an AS group scales out, scale-in requests triggered manually or by scheduled or periodic policies will be executed immediately after the scale-out is complete, without being affected by the cooldown period.
    • When an AS group scales in, scale-out requests triggered manually or by scheduled or periodic policies will be executed immediately after the scale-in is complete, without being affected by the cooldown period.

    300

  1. Click OK.

    The newly added AS policy is displayed on the AS Policies tab. In addition, the AS policy is in Enabled state by default.

NOTE:

If you have created scheduled or periodic AS policies that are invoked at the same time, AS will execute the one created later. This constraint does not apply to alarm-triggered AS policies.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback