Updated on 2024-07-02 GMT+08:00

Enabling Overload Control for a Cluster

Scenario

After overload control is enabled, the number of simultaneous requests is dynamically regulated according to the resource pressure on the master nodes. This ensures that both the nodes and the cluster remain accessible.

Notes and Constraints

The cluster version must be 1.23 or later.

Enabling Overload Control

Method 1: Enabling it when creating a cluster

When creating a cluster of v1.23 or later, you can enable overload control during the cluster creation.

Figure 1 Enabling overload control during cluster creation

Method 2: Enabling it in an existing cluster

  1. Log in to the CCE console and click the name of an existing cluster whose version is v1.23 or later.
  2. On the Overview page, check the master node information. If overload control is not enabled, a message will be displayed. You can click Enable to enable the function.

    Figure 2 Enabling overload control for an existing cluster

Overload Monitoring

Method 1: Using the CCE console

  1. Log in to the CCE console and click the name of an existing cluster whose version is v1.23 or later.
  2. On the Overview page, check the master node information. The overload level metric will be displayed.

    The overload levels are as follows:
    • Circuit breaking: Rejects all external traffic.
    • Severe overload: Rejects 75% external traffic.
    • Moderate overload: Rejects 50% external traffic.
    • Slight overload: Rejects 25% external traffic.
    • Normal: Does not reject external traffic.

Method 2: Using AOM

You can log in to the AOM console, create a dashboard, and add the metric named vein_overload_level. For details, see Dashboard.

The meanings of the monitoring metrics are as follows:

  • 0: Circuit breaking: Rejects all external traffic.
  • 1: Severe overload: Rejects 75% external traffic.
  • 2: Moderate overload: Rejects 50% external traffic.
  • 3: Slight overload: Rejects 25% external traffic.
  • 4: Normal: Does not reject external traffic.

The following uses the operations performed on AOM as an example.

  1. Log in to the AOM console, choose Dashboard in the navigation pane and click Add Dashboard.

    Figure 3 Creating a dashboard

  2. After the dashboard is created, add a metric graph.

    • Graph Name: Cluster Overload Metrics
    • Add By: All metrics
    • Metric: vein_overload_level
    • Scope: Optional
    Figure 4 Adding a metric graph

  3. After configuring parameters, click Save in the upper right corner.
  4. Click in the upper right corner to save the dashboard.

    Figure 5 Saving a dashboard

Overload Alarm

The following uses the operations performed on AOM as an example.

  1. Log in to the AOM console. In the navigation pane, choose Alarm Management > Alarm Rules. Click Create.
  2. Set the following parameters:

    • Rule Name: Cluster overload alarms
    • Enterprise Project: Enter default.
    • Rule Type: Metric alarm rule
    • Configuration Mode: Select from all metrics
    • Alarm Condition: Select vein_overload_level and configure the corresponding scope.
      • If the metric value is less than or equal to 1, the cluster is heavily overloaded. You are advised to set a critical alarm.
      • If the metric value is less than or equal to 2, the cluster is moderately overloaded. You are advised to set a major alarm.
      • If the metric value is less than or equal to 3, the cluster is slightly overloaded. You are advised to set a minor alarm.

    Set other parameters as required.

    Figure 6 Configuring an alarm rule for an overloaded cluster

  3. Click Create Now.

Disabling Cluster Overload Control

  1. Log in to the CCE console and click the name of an existing cluster whose version is v1.23 or later.
  2. In the navigation pane, choose Settings.
  3. On the Cluster Access tab page, disable overload control.
  4. Click OK.