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

Adding an Auto Scaling Policy for MRS Task Nodes

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

Video Tutorial

This tutorial demonstrates how to configure AS when purchasing a cluster and how to add an AS policy to an existing cluster.

NOTE:

The UI may vary depending on the version. This tutorial is for reference only.

Configuring Auto Scaling During Cluster Creation

When you create a cluster, you can configure the auto scaling function in advanced configuration parameters.

NOTE:

Auto scaling policies can be configured during cluster creation only for analysis, streaming, and hybrid clusters.

  1. Log in to the MRS management console.
  2. When you buy a cluster containing task nodes, configure the cluster software and hardware information by referring to Manually Buying an MRS Cluster. Then, on the Set Advanced Options page, enable Analysis Task and configure or modify auto scaling rules and resource plans.

    Figure 1 Configuring auto scaling rules when creating a cluster

Adding an Auto Scaling Policy for a Cluster

After a cluster is created, you can configure rules for the task node group in a cluster by node group or resource pool.

The node group policy and resource pool policy are mutually exclusive. You can configure either of them as needed.

MRS 3.1.5 or later supports the specified resource pool policy.

Item

By Node Group

By Resource Pool

Auto scaling object

All nodes in the task node group

Task nodes in the resource pool specified by an auto scaling policy

Resource pool ownership of added nodes

Default resource pool

Resource pool specified by the auto scaling policy

Scale-in object

Random scale-in of nodes in the task node group

Random scale-in of nodes in a resource pool specified by an auto scaling policy

Prerequisites

Procedure

  1. Log in to the MRS management console.
  2. Choose Active Clusters, select a running cluster, and click its name to go its details page.
  3. On the page that is displayed, click the Auto Scaling tab.

    You can configure policies by resource pool or node group as needed.

    NOTE:
    • Auto scaling policies of different node groups are mutually exclusive. That is, you can enable auto scaling policies only for one node group.
    • An auto scaling rule adjusts the number of nodes, but also affects the actual price. Exercise caution when adding an auto scaling rule.

  4. Click Create Auto Scaling Policy to create an auto scaling policy.

Scenario 1: Using Auto Scaling Rules Alone

Scenario where only auto scaling rules are configured: The number of nodes needs to be dynamically adjusted based on the YARN resource usage. When the available YARN memory is less than 20%, five nodes need to be added. When the available YARN memory is greater than 70%, five nodes need to be reduced. The number of nodes in a task node group ranges from 1 to 10.

  1. Go to the Auto Scaling page to configure auto scaling rules.

    • Configure the Default Range parameter.

      Enter a task node range, in which auto scaling is performed. This constraint applies to all scale-in and scale-out rules. The maximum value range allowed is 0 to 500.

      The value range in this example is 1 to 10.

    • Configure an auto scaling rule.

      To enable Auto Scaling, you must configure a scale-out or scale-in rule.

      1. Select Scale-Out or Scale-In.
      2. Click Add Rule.
        Figure 2 Adding a rule
      3. Configure Rule Name, If, Last For, Add, and Cooldown Period. For details about auto scaling metrics, see Automatic Scaling of Task Nodes in an MRS Cluster.
      4. Click OK.

        You can view, edit, or delete the rules you configured in the Scale-out or Scale-in area on the Auto Scaling page. You can click Add Rule to configure multiple rules.

  2. Click OK.

    NOTE:

    If you want to configure an auto scaling rule for an existing cluster, select I agree to authorize MRS to scale out or in nodes based on the above rule.

Scenario 2: Using Resource Plans Alone

If the data volume changes regularly every day and you want to scale out or in a cluster before the data volume changes, you can create resource plans to adjust the number of Task nodes as planned in the specified time range.

For example: A real-time processing service sees a sharp increase in data volume from 7:00 to 13:00 on Monday, Tuesday, and Saturday. Assume that an MRS streaming cluster is used to process the service data. Five task nodes are required from 7:00 to 13:00 on Monday, Tuesday, and Saturday, while only two are required at other time.

  1. Go to the Auto Scaling page to configure a resource plan.

    NOTE:

    A resource plan can be configured to adjust the number of nodes, which affects the actual price. Exercise caution when performing this operation.

  2. For example, the Default Range of node quantity is set to 2-2, indicating that the number of task nodes is fixed to 2 except the time range specified in the resource plan.
  3. Click Configure Node Range for Specific Time Range under Default Range or Add Resource Plan.
  4. Configure Effective On, Time Range, and Node Range.

    For example, set Effective On to Monday, Tuesday, and Saturday, Time Range to 07:00-13:00, and Node Range to 5-5. This indicates that the number of task nodes is fixed at 5 from 07:00 to 13:00.

    Click Configure Node Range for Specific Time Range to configure multiple resource plans.

    NOTE:
    • Effective On is set to Daily by default. You can also select one or multiple days from Monday to Sunday.
    • If you do not set Node Range, its default value will be used.
    • If you set both Node Range and Time Range, the node range you set will be used during the time range you set, and the default node range will be used beyond the time range you set. If the time is not within the configured time range, the default range is used.

Scenario 3: Using Auto Scaling Rules and Resource Plans Together

If the data volume is not stable and the expected fluctuation may occur, the fixed Task node range cannot guarantee that the requirements in some service scenarios are met. In this case, it is necessary to adjust the number of Task nodes based on the real-time loads and resource plans.

For example: A real-time processing service sees an unstable increase in data volume from 7:00 to 13:00 on Monday, Tuesday, and Saturday. For example, 5 to 8 task nodes are required from 7:00 to 13:00 on Monday, Tuesday, and Saturday, and 2 to 4 are required beyond this period. You can set an auto scaling rule based on a resource plan. When the data volume exceeds the expected value, the number of Task nodes changes with resource loads, without exceeding the node range specified in the resource plan. When a resource plan is triggered, the number of nodes is adjusted within the specified node range with minimum affect. That is, increase nodes to the upper limit and decrease nodes to the lower limit.

  1. Go to the Auto Scaling page to configure auto scaling rules.

    An auto scaling rule adjusts the number of nodes, but also affects the actual price. Exercise caution when adding an auto scaling rule.

    • Default Range

      Enter a task node range, in which auto scaling is performed. This constraint applies to all scale-in and scale-out rules.

      For example, this parameter is set to 2-4 in this scenario.

    • Auto Scaling

      To enable Auto Scaling, you must configure a scale-out or scale-in rule.

      1. Select Scale-Out or Scale-In.
      2. Click Add Rule. The Add Rule page is displayed.
        Figure 3 Adding a rule
      3. Configure the Rule Name, If, Last for, Add, and Colddown Period parameters.
      4. Click OK.

        You can view, edit, or delete the rules you configured in the Scale-out or Scale-in area on the Auto Scaling page.

  2. Configure a resource plan.

    1. Click Configure Node Range for Specific Time Range under Default Range or Add Resource Plan.
    2. Configure Effective On, Time Range, and Node Range.

      For example, set Effective On to Monday, Tuesday, and Saturday, Time Range to 07:00-13:00, and Node Range to 5-8.

      Click Configure Node Range for Specific Time Range or Add Resource Plan to configure multiple resource plans.

      NOTE:
      • Effective On is set to Daily by default. You can also select one or multiple days from Monday to Sunday.
      • If you do not set Node Range, its default value will be used.
      • If you set both Node Range and Time Range, the node range you set will be used during the time range you set, and the default node range will be used beyond the time range you set. If the time is not within the configured time range, the default range is used.

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