This topic describes how to configure an auto scaling policy for CPU resources in an ApsaraDB MyBase dedicated cluster. This helps you utilize idle resources on your hosts to improve instance performance.

Scenarios

For example, if 8 instances with a specification of 4 cores and 8 GB memory each are deployed on a host with a specification of 16 cores and 128 GB memory, the total CPU resources of the instances are twice the total CPU resources of the host. In this case, the CPU overcommit ratio of the host is 200%. When traffic spikes or flash sales occur, a maximum of 4 cores can be used for each instance due to the instance specification limits. This can cause serious resource issues. In this case, your business requirements cannot be met due to insufficient resources.

You can configure static policies to temporarily increase CPU resources and the upper limit of instance specifications. For more information, see Upgrade the specifications of an instance for short-term use. This method is suitable only for scenarios in which you can forecast traffic spikes and manually increase the CPU resources in advance. If you use this method, resource scaling cannot be triggered in real time. To ensure performance during unexpected traffic spikes, we recommend that you configure an auto scaling policy for CPU resources in your dedicated cluster. This way, the system automatically increases CPU resources based on the resource usage and available host resources. This reduces O&M costs.

Supported database engines

An auto scaling policy for CPU resources can be configured only for a dedicated cluster that runs the MySQL database engine or a dedicated cluster that runs the PostgreSQL database engine.
Note For information about how to create an ApsaraDB MyBase for MySQL instance or an ApsaraDB MyBase for PostgreSQL instance, see the following topics:

Precautions

  • If auto scaling policies for CPU resources are configured for ApsaraDB MyBase for MySQL dedicated clusters, the policies take effect only on the corresponding ApsaraDB MyBase for MySQL instances of the High-availability Edition.
  • After you modify an auto scaling policy for CPU resources for an ApsaraDB MyBase dedicated cluster, wait about three minutes for the new configuration to take effect.
  • After an auto scaling policy for CPU resources takes effect on an ApsaraDB MyBase dedicated cluster, auto scaling of CPU resources is triggered for an instance in the dedicated cluster when 80 percent of the CPU resources of the instance are utilized. The CPU resources are scaled based on the auto scaling policy.

Procedure

  1. Log on to the ApsaraDB MyBase console.
  2. In the upper-left corner of the page, select a region.
  3. In the left-side navigation pane, click Dedicated Clusters. On the page that appears, find the dedicated cluster that you want to manage and click Details in the Actions column.
  4. On the cluster details page, click the Elasticity Policy tab. Then, specify Scale-up Ratio for the CPU resources and click Save.
    Note By default, Scale-up Ratio for the CPU resources is set to 50%.