• Cloud Container Engine

cce
  1. Help Center
  2. Cloud Container Engine
  3. User Guide 2.0
  4. Cluster Management
  5. Cluster Auto Scaling

Cluster Auto Scaling

Cluster auto scaling dynamically changes the number of nodes in a cluster based on service loads. When applications cannot be scheduled due to insufficient resources in a cluster, the cluster will be automatically scaled out, which reduces labor costs.

NOTE:

CCE supports auto scaling out, but scaling in must be performed manually.

Procedure

  1. Log in to the CCE console. In the navigation pane, choose Resource Management > VM Clusters. Click Auto Scaling for the cluster that you want to scale out.
  2. Click Edit, and configure the parameters for configuring AS policies in Table 1 as specified.

    Table 1 Parameters for configuring AS policies

    Parameter

    Description

    Minimum Nodes

    Minimum number of nodes in a cluster.

    The value must be 1 or greater, and smaller than the maximum number of nodes in a cluster.

    Maximum Nodes

    Maximum number of nodes in a cluster.

    The value must be 1 or greater, and smaller than the node quota of a cluster.

    NOTE:

    The node quota of a cluster depends on the maximum number of nodes allowed in a single cluster or the node quota of your account. The smaller of these two values is used as the node quota of a cluster.

    Cooldown Period (s)

    Interval (in seconds) between consecutive scaling operations. The cooldown period ensures that a scaling operation is initiated only when a previous scaling operation is finished and the system is running stably.

    Value range: 60–3600

    Default value: 900

    It takes about 2 to 10 minutes to create a node. If the cooldown period is less than 900 seconds, node creation may fail.

    Node Configuration

    If capacity expansion is required after the scaling policy is executed, the system creates a node.

    1. Click Set and set the node parameters. For details about how to set the node parameters, see Table 1.
    2. Click OK.

  3. Review the scaling configuration and node parameters, and click OK.
  4. Click the Scale-out Policies tab, and click Add Policy.

    • Policy Name: Enter a policy name (for example, policy01).
    • Set Policy Type. Currently, the following types of auto scaling policies are supported:
      • Metric-based policy: scaling based on the CPU or memory settings. Relevant parameters are described in Table 2.
        Table 2 Parameters for adding a metric-based policy

        Parameter

        Description

        Policy Type

        Set this parameter to Metric-based policy.

        Metric

        Select Allocated CPU or Allocated memory.

        Trigger Condition

        Conditions for triggering a policy when the average CPU or memory allocation value is greater than or less than a specified percentage.

        Duration

        Metric monitoring interval.

        For example, if you set this parameter to 15 min, the metrics are monitored every 15 minutes.

        Consecutive Times

        If you set this parameter to 3, the action is triggered if the metrics meet the specified threshold three consecutive times.

        Action

        Action executed after all the conditions for a specified policy are met.

      • Scheduled policy: scaling at a specified time. Relevant parameters are described in Table 3.
        Table 3 Parameters for adding a scheduled policy

        Parameter

        Description

        Policy Type

        Set this parameter to Scheduled policy.

        Trigger Time

        Time at which a policy is triggered.

        Action

        Action executed after all the conditions for a specified policy are met.

      • Periodic policy: scaling at a specified time on a daily, weekly, or monthly basis. Relevant parameters are described in Table 4.
        Table 4 Parameters for adding a periodic policy

        Parameter

        Description

        Policy Type

        Set this parameter to Periodic policy.

        Select Time

        Time at which a policy is triggered.

        Action

        Action executed after all the conditions for a specified policy are met.

  5. Click OK.