Help Center/ MapReduce Service/ User Guide (Paris Region)/ Configuring a Cluster/ Configuring Auto Scaling Rules/ Scenario 3: Using Both Auto Scaling Rules and Resource Plans
Updated on 2024-10-11 GMT+08:00

Scenario 3: Using Both Auto Scaling Rules and Resource Plans

Background

A real-time processing service sees an unstable increase in data volume from 7:00 to 13:00 every day. For example, 5 to 8 task nodes are required from 7:00 to 13:00, and 2 to 4 are required beyond this period. Therefore, 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 can be adjusted if resource loads change, 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.

Procedure

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

    • 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.
      3. Configure the Rule Name, If, Last for, Add, and Cooldown 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.

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

      • 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.