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
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
On this page

Configuring a Metric AS Policy

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

This section describes how to configure a metric AS policy. Currently, instances can be automatically added or deleted based on CPU, memory thresholds, and custom metrics. This frees you from repeatedly adjusting resources to keep up with service changes and peak pressures, helping you reduce resources and labor costs.

NOTE:

CAE instance scaling is calculated by current and expected metrics.

Expected instances = ceil [Current instances * (Current metrics/Expected metrics)] (ceil is rounded up.)

There is an error tolerance of 10% to prevent frequent fluctuation of instance quantity, so there is no scaling when Current metrics/Expected metric ranges from 0.9 to 1.1.

Application Scenario

This policy is useful for burst traffic and typical periodic traffic, mainly in industries such as the Internet, games, and social platforms.

Procedure

  1. Log in to CAE.
  2. Choose Component Configurations.
  3. Select the target component from the drop-down list in the upper part of the page.

    Figure 1 Selecting a component

  4. Click Edit in the AS Policies module.
  5. Select Metric and configure the policy by referring to Table 1.

    Table 1 Configuring a metric policy

    Parameter

    Description

    Max. Instances

    Max. number of instances that can be reached during scale-out.

    Value range: 1 to 99.

    NOTE:

    Max. Instances must be greater than Min Instances.

    Min Instances

    Min number of instances that can be reached during scale-in.

    Value range: 1 to 99.

    Metric

    • CPU usage, a preset metric in the system
    • Memory usage, a preset metric in the system
    • Custom metrics. Click Add Expected Value and select a custom metric from the drop-down list to add a custom metric. For details about how to create a custom metric, see Configuring Custom Metrics.
      You can add multiple custom metrics.
      NOTE:
      • You must enter a PromQL statement. PromQL is a built-in data query language from Prometheus, and is used to select, aggregate, and perform logical calculation on time series data. For details, see Prometheus.
      • The query result of the PromQL statement must be a single value of the vector or scalar type.
      • Upgrade the component created/upgraded before November 3, 2023 for the custom scaling policy to take effect.

    You can scale instances based on the CPU and memory thresholds.

    For example, set the maximum expected CPU usage to 80 and memory usage to 70. When the CPU usage of a component is greater than 80% or the memory usage is greater than 70%, the system automatically increases the number of component instances. When the CPU usage of a component is less than 80% and the memory usage is less than 70%, the system automatically reduces the number of component instances.

    Figure 2 Configuring a metric policy

    You can scale instances based on the custom metrics.

    For example, select click_ operated_total from the drop-down list, enter the PromeQL statement max(avg_over_time(click_operated_total{environment_name="env-test",application_name="test",component_name="demo-backend-1676360408"}[1m])), and set the expected value to 10.

    • The PromeQL statement indicates the maximum average value of click_ operated_total per minute of all the demo-backend-1676360408 component instances.
    • If the value of the PromeQL statement is greater than the expected value, the system automatically increases the number of component instances.
    • If the value of the PromeQL statement is less than the expected value, the system automatically reduces the number of component instances.
      Figure 3 Configuring a custom metric policy

  6. (Optional) Expand Advanced Settings and configure advanced settings by referring to Table 2.

    Table 2 Configuring advanced settings

    Parameter

    Description

    Scale-out Step

    Number of pods to be added per minute.

    Value range: 1 to 99. Default value: 4.

    Stable Scale-out Window (s)

    Value range: 1 to 3600, in seconds. Default value: 0.

    Scale-in Step

    Number of pods to be reduced per minute.

    Value range: 1 to 99. Default value: 99.

    Stable Scale-in Window (s)

    Value range: 1 to 3600, in seconds. Default value: 300.

    Disable Scale-in

    Click to disable scale-in.

    Figure 4 Advanced settings

  7. Click OK.
  8. Click Activate Settings in the upper part of the page. In the dialog box displayed on the right, confirm the configurations and click OK for the configurations to take effect.

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