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
Help Center/ MapReduce Service/ Best Practices/ MRS Cluster Management/ Configuring Auto Scaling for an MRS Cluster

Configuring Auto Scaling for an MRS Cluster

Updated on 2024-08-12 GMT+08:00

In big data application scenarios, especially real-time data analysis and processing, the number of cluster nodes needs to be dynamically adjusted according to data volume changes to provide proper resources. The auto scaling function of MRS enables clusters to be automatically scaled out or in based on cluster load.

  • Auto scaling rules: You can increase or decrease Task nodes based on real-time cluster loads. Auto scaling will be triggered when the data volume changes but there may be some delays.
  • Resource plan (setting the task node quantity based on the time range): If the data volume changes periodically, you can create resource plans to resize the cluster before the data volume changes, thereby avoiding delays in increasing or decreasing resources.

You can configure either auto scaling rules or resource plans or both of them to trigger the auto scaling.

Scenario

The following example describes how to use both auto scaling rules and resource plans:

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 changes within the specified range with minimum affect. That is, increase nodes to the upper limit and decrease nodes to the lower limit.

Video Tutorial

This video uses an MRS 3.1.0 cluster as an example to describe how to configure an auto scaling policy when you purchase a cluster and how to add an auto scaling policy to an existing cluster. For details, see Configuring Auto Scaling for an MRS Cluster.

NOTE:

The UI may vary according to the version. The video tutorial is for reference only.

Adding a Task Node

You can scale out an MRS cluster by manually adding task nodes.

To add a task node to a custom cluster, perform the following steps:

  1. On the cluster details page, click the Nodes tab and click Add Node Group. The Add Node Group page is displayed.
  2. Select Task forNode Type. Retain the default value NM for Deploy Roles. To deploy the NodeManager role, the node type must be Task. Set other parameters as required.
    Figure 1 Adding a task node group
To add a task node to a non-custom cluster, perform the following steps:
  1. On the cluster details page, click the Nodes tab and click Configure Task Node. The Configure Task Node page is displayed.
  2. On the Configure Task Node page, set Node Type, Instance Specifications, Nodes, System Disk. In addition, if Add Data Disk is enabled, configure the storage type, size, and number of data disks.

  3. Click OK.

Using Auto Scaling Rules and Resource Plans Together

  1. Log in to the MRS management console.
  2. On the Active Clusters page, and click the name of the cluster to be operated. The cluster details page is displayed.
  3. On the page that is displayed, click the Auto Scaling tab.
  4. Click Add Auto Scaling Policy and set Node Range to 2-4.

    Figure 2 Configuring auto scaling

  5. Configure a resource plan.

    1. Click Configure Node Range for Specific Time Range under Default Range.
    2. Configure the Time Range and Node Range parameters.

      Time Range: Set it to 07:00-13:00.

      Node Range: Set it to 5-8.

      Figure 3 Auto scaling

  6. Configure an auto scaling rule.

    1. Select Scale-out.
    2. Click Add Rule on the right.
      Figure 4 Adding a rule

      Rule Name: default-expand-2.

      If: Select the rule objects and constraints from the drop-down list boxes, for example, YARNAppRunning is greater than 75.

      Last For: Set it to 1 five-minute periods.

      Add: Set it to 1 node.

      Cooldown Period: Set it to 20 minutes.

    3. Click OK.

  7. Select I agree to authorize MRS to scale out or in nodes based on the above rule.
  8. Click OK.

Reference Information

When adding a rule, you can refer to Table 1 to configure the corresponding metrics.
NOTE:
  • Hybrid clusters support all metrics of analysis and streaming clusters.
  • The accuracy of different value types in Table 1 is as follows:
    • Integer: integer
    • Percentage: 0.01
    • Ratio: 0.01
Table 1 Auto scaling metrics

Cluster Type

Metric

Value Type

Description

Streaming cluster

StormSlotAvailable

Integer

Number of available Storm slots.

Value range: 0 to 2147483646.

StormSlotAvailablePercentage

Percentage

Percentage of available Storm slots, that is, the proportion of the available slots to total slots.

Value range: 0 to 100.

StormSlotUsed

Integer

Number of used Storm slots.

Value range: 0 to 2147483646.

StormSlotUsedPercentage

Percentage

Percentage of the used Storm slots, that is, the proportion of the used slots to total slots.

Value range: 0 to 100.

StormSupervisorMemAverageUsage

Integer

Average memory usage of the Supervisor process of Storm.

Value range: 0 to 2147483646.

StormSupervisorMemAverageUsagePercentage

Percentage

Average percentage of the used memory of the Supervisor process of Storm to the total memory of the system.

Value range: 0 to 100.

StormSupervisorCPUAverageUsagePercentage

Percentage

Average percentage of the used CPUs of the Supervisor process of Storm to the total CPUs.

Value range: [0, 6000].

Analysis cluster

YARNAppPending

Integer

Number of pending tasks on Yarn.

Value range: 0 to 2147483646.

YARNAppPendingRatio

Ratio

Ratio of pending tasks on YARN, that is, the ratio of pending tasks to running tasks on YARN.

Value range: 0 to 2147483646.

YARNAppRunning

Integer

Number of running tasks on Yarn.

Value range: 0 to 2147483646.

YARNContainerAllocated

Integer

Number of containers allocated to YARN.

Value range: 0 to 2147483646.

YARNContainerPending

Integer

Number of pending containers on Yarn.

Value range: 0 to 2147483646.

YARNContainerPendingRatio

Ratio

Ratio of pending containers on Yarn, that is, the ratio of pending containers to running containers on Yarn.

Value range: 0 to 2147483646.

YARNCPUAllocated

Integer

Number of virtual CPUs (vCPUs) allocated to Yarn.

Value range: 0 to 2147483646.

YARNCPUAvailable

Integer

Number of available vCPUs on Yarn.

Value range: 0 to 2147483646.

YARNCPUAvailablePercentage

Percentage

Percentage of available vCPUs on Yarn, that is, the proportion of available vCPUs to total vCPUs.

Value range: 0 to 100.

YARNCPUPending

Integer

Number of pending vCPUs on Yarn.

Value range: 0 to 2147483646.

YARNMemoryAllocated

Integer

Memory allocated to Yarn. The unit is MB.

Value range: 0 to 2147483646.

YARNMemoryAvailable

Integer

Available memory on Yarn. The unit is MB.

Value range: 0 to 2147483646.

YARNMemoryAvailablePercentage

Percentage

Percentage of available memory on Yarn, that is, the proportion of available memory to total memory on Yarn.

Value range: 0 to 100.

YARNMemoryPending

Integer

Pending memory on Yarn.

Value range: 0 to 2147483646.

When adding a resource plan, you can set parameters by referring to Table 2.
Table 2 Configuration items of a resource plan

Parameter

Description

Effective On

The effective date of a resource plan. Daily is selected by default. You can also select one or multiple days from Monday to Sunday.

Time Range

Start time and end time of a resource plan are accurate to minutes, with the value ranging from 00:00 to 23:59. For example, if a resource plan starts at 8:00 and ends at 10:00, set this parameter to 8:00-10:00. The end time must be at least 30 minutes later than the start time. Time ranges configured for different resource plans cannot overlap.

Node Range

The number of nodes in a resource plan ranges from 0 to 500. In the time range specified in the resource plan, if the number of task nodes is less than the specified minimum number of nodes, it will be increased to the specified minimum value of the node range at a time. If the number of task nodes is greater than the maximum number of nodes specified in the resource plan, the auto scaling function reduces the number of task nodes to the maximum value of the node range at a time. The minimum number of nodes must be less than or equal to the maximum number of nodes.

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