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

Scaling a Workload

Updated on 2024-10-29 GMT+08:00

This section describes two workload scaling methods: auto scaling and manual scaling.

  • Auto scaling: Supports metric-based, scheduled, and periodic policies. When the configuration is complete, pods can be automatically added or deleted based on resource changes or a specified schedule.
  • Manual scaling: Increases or decreases the number of pods immediately after the configuration is complete.
NOTICE:

If a pod mounted with an EVS volume is deleted, the EVS disk will not be deleted. If a new pod with the same name is created, the new pod cannot be mounted to any EVS volume.

Auto Scaling

NOTE:

Currently, auto scaling is supported only for Deployments.

An appropriate auto scaling policy eliminates the need to manually adjust resources in response to service changes and traffic peaks, thus helping you reduce the workforce and resources required. CCI supports the following types of auto scaling policies:

Metric-based: Scales the workload based on vCPU/memory usage. You can specify a CPU/memory usage threshold. If the usage is higher or lower than the threshold, instances can be automatically added or deleted.

Scheduled: Scales the workload at a specified time. A scheduled scaling policy is ideal for scenarios such as flash sales and anniversary promotions.

Periodic: Scales the workload on a daily, weekly, or monthly basis. A periodic scaling policy is ideal for applications that have periodic traffic changes.

  • Configure a metric-based auto scaling policy.
    1. Log in to the CCI console. In the navigation pane on the left, choose Workloads > Deployments. On the page displayed, locate the Deployment and click its name.
    2. In the Scaling area of the Deployment details page, click Auto Scaling and then click Add Scaling Policy.
      Figure 1 Adding a metric-based auto scaling policy
      Table 1 Parameters of a metric-based auto scaling policy

      Parameter

      Description

      Policy Name

      Enter a name for the policy.

      Policy Type

      Select Metric-based policy.

      Trigger Condition

      Select CPU usage or Memory usage.

      If you set the trigger condition to average memory usage > 70%, the scaling policy will be triggered when the average memory usage exceeds 70%.

      Duration

      Statistical period. Select a value from the drop-down list.

      If you set this parameter to 60, metric statistics will be collected every 60 seconds.

      Consecutive Times

      If you set this parameter to 3, the configured action will be triggered when the threshold is reached for 3 consecutive statistical periods.

      Policy Action

      Specify the action to be executed when the policy is triggered. You can specify an action to add or reduce the number of instances.

    3. Click OK.
      The policy is added to the policy list, and its status is Enabled.
      Figure 2 Policy enabled

      When the trigger condition is met, the auto scaling policy will be executed.

  • Configure a scheduled auto scaling policy.
    1. In the Scaling area, click Auto Scaling and then click Add Scaling Policy.
      Figure 3 Adding a scheduled auto scaling policy
      Table 2 Parameters of a scheduled auto scaling policy

      Parameter

      Description

      Policy Name

      Enter a name for the policy.

      Policy Type

      Select Scheduled Policy.

      Triggered

      Specify the time when you want the policy to be triggered.

      Policy Action

      Specify the action to be executed when the policy is triggered. You can specify an action to add or reduce the number of instances.

    2. Click OK.

      The policy is added to the policy list, and its status is Enabled.

  • Configure a periodic auto scaling policy.
    1. In the Scaling area, click Auto Scaling and then click Add Scaling Policy.
      Figure 4 Adding a periodic auto scaling policy
      Table 3 Parameters of a periodic auto scaling policy

      Parameter

      Description

      Policy Name

      Enter a name for the policy.

      Policy Type

      Select Periodic Policy.

      Select Time

      Select the time range, frequency, and time when you want the policy to be triggered.

      Policy Action

      Specify the action to be executed when the policy is triggered.

    2. Click OK.

      The policy is added to the policy list, and its status is Enabled.

Manual Scaling

  1. Log in to the CCI console. In the navigation pane on the left, choose Workloads > Deployments. On the page displayed, locate the Deployment and click its name.
  2. Under Manual Scaling in the Scaling area, click and modify the number of instances (for example, change the value to 3), and then click Save. The scaling takes effect immediately.

    CCI provides a time window for running pre-stop processing commands before an application is deleted. If a command process is still running when the time window expires, the application will be forcibly deleted.

    Figure 5 Changing the number of instances

  3. In the pod list, you can see the new pods being created. When the status of all added pods changes to Running, the scaling is completed successfully.

    Figure 6 Pod list after a manual scaling

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback