Updated on 2023-04-28 GMT+08:00

Configuring the Number of Worker Nodes

Scenario

On the HetuEngine web UI, you can adjust the number of worker nodes for a compute instance so that worker nodes can be added when they are insufficient and reduced when they are idle. The number of worker nodes can be adjusted manually or automatically.

Prerequisites

You have created a user for accessing the HetuEngine web UI. For details, see Creating a HetuEngine User.

  • When an instance is being scaled in or out, the original services are not affected and the instance can still be used.
  • Dynamic instance scale-in/out is delayed to implement smooth adjustment of resource consumption within a long period of time. It cannot respond to the requirements of running SQL tasks for available resources in real time.
  • After instances are dynamically scaled in or out, the number of worker nodes displayed in the instance configuration area on the HSConsole page remains the initial value and does not change with dynamic scaling.
  • The dynamic instance scale in/out function will be affected if the HSBroker and Yarn services are restarted after the function is enabled. Disable the function before you restart the services.
  • Before scaling out a compute instance, ensure that the current queue has sufficient resources. Otherwise, the scale-out cannot reach the expected result and subsequent scale-in operations will be affected.
  • You can set the timeout period for manual instance scale in/out. For this, log in to Manager, choose HetuEngine > Configurations > All Configurations, search for application.customized.properties, and add the yarn.hetuserver.engine.flex.timeout.sec parameter. The default value is 300 (in seconds).

Procedure

  1. Log in to FusionInsight Manager as a user who can access the HetuEngine web UI and choose Cluster > Services > HetuEngine. The HetuEngine service page is displayed.
  2. In the Basic Information area on the Dashboard tab page, click the link next to HSConsole WebUI. The HSConsole page is displayed.
  3. In the Compute Instance page, locate the row that contains the target instance and click Configure in the Operation column.

    • If manual scaling is required, change the value of Quantity in the Worker Container Resource Configuration area on the configuration page and click OK. The compute instance status changes to SCALING OUT or SCALING IN. After the scaling is complete, the compute instance status changes to RUNNING.
    • If automatic scaling is required, set Scaling in Advanced Configuration to ON and configure the following parameters according to Table 1 to enable dynamic scaling.
      Table 1 Dynamic scaling parameters

      Parameter

      Description

      Example Value

      Scale-out Threshold

      When the average value of the instance resource usage in the scale-in/out decision-making period exceeds the threshold, the instance starts to scale out.

      0.9

      Scale-out Size

      Number of worker nodes to be added each time when the instance starts to scale out.

      1

      Scale-out Decision Period

      Interval for determining whether to scale out an instance. Unit: second

      200

      Scale-in Threshold

      When the average value of the instance resource usage in the scale-in/out decision-making period exceeds the threshold, the instance starts to scale in.

      0.1

      Scale-in Size

      Number of worker nodes to be reduced each time when the instance starts to scale in.

      1

      Scale-in Decision Period

      Interval for determining whether to scale in an instance. Unit: second

      300

      Load Collection Period

      Interval for collecting instance load information. Unit: second

      10

      Scale-out Timeout Period

      Timeout period of the scale-out operation. Unit: second

      400

      Scale-in Timeout Period

      Timeout period of the scale-in operation. Unit: second

      600

  4. After the configuration, click OK.