You can change the specifications of a PolarDB cluster based on your business requirements. This topic describes how to upgrade or downgrade the specifications of a PolarDB cluster.

Prerequisites

  • The service edition of PolarDB for MySQL clusters must be Cluster Edition. The Single Node and Archive Database editions do not support specification changes. For more information, see Product editions.
  • The cluster does not have pending tasks for specification changes.

Background information

PolarDB allows you to dynamically scale out a cluster. You do not need to lock databases when you change the specifications of the cluster. PolarDB supports capacity scaling in the following three dimensions:

  • Vertically scale the computing capacity: Upgrade or downgrade the specifications of the cluster. This topic describes the details of vertically scaling.
  • Horizontally scale the computing capacity: Add or remove read-only nodes. For more information, see Add or remove read-only nodes.
  • Horizontally scale the storage capacity: PolarDB uses a serverless architecture. You do not need to manually specify or scale the storage capacity. The storage capacity is automatically adjusted based on the data volume. To store large volumes of data, we recommend that you use storage plans to reduce costs.

How specification changes are charged

For more information, see Configuration change fees.

Limits

  • Only subscription clusters support Temporary Upgrade. For more information, see Perform a temporary upgrade.
  • Only pay-as-you-go PolarDB for MySQL clusters support automatic scale-out and scale-in. Subscription clusters do not support automatic scale-out or scale-in.

Considerations

  • You can upgrade or downgrade only the specifications of a cluster. You cannot upgrade or downgrade specifications of an individual node in the cluster.
  • Specification upgrades or downgrades do not affect the existing data in clusters.
  • You may experience PolarDB service interruptions for a few seconds during specification changes. During this time, you cannot perform some operations. We recommend that you change specifications during off-peak hours and make sure that your applications can automatically reconnect to the cluster.
  • Typically, read-only requests are slower to execute than read/write requests. When you change the specifications of a PolarDB cluster, it may require even more time to execute read-only requests than read/write requests.

Manually change specifications

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster resides.
  3. You can open the Change Configurations dialog box by using the following methods:
    • Method 1:
      On the Clusters page, find the cluster for which you want to change specifications, and click Change Configurations in the Actions column.Clusters
    • Method 2:
      1. On the Clusters page, click the ID of the cluster.
      2. In the Database Nodes section on the Overview page, click Change Configurations.Change specifications
  4. Select Upgrade or Downgrade based on your business requirements, and click OK.
  5. On the Upgrade/Downgrade page, select the required node specification and Switching Time, read and accept the terms of service, and then click Buy Now.
    Note
    • All nodes in a cluster use the same specifications.
    • You can specify Switching Time only when you select Upgrade. You cannot specify the switching time when you select Downgrade or Temporary Upgrade.
    • You can set Switching Time to Switch Now or Switch At. If you select Switch At, you can specify a point in time within 24 hours. It requires about 30 minutes to upgrade the cluster from the specified point in time.
  6. On the Purchase page, confirm the order information and click Purchase.
    Note It requires about 10 minutes for the new specifications to take effect.

Automatic specification change

You can configure auto scaling for PolarDB for MySQL clusters by using the following methods:

  • Method 1: The diagnostics feature of PolarDB for MySQL integrates with some features of Database Autonomy Service (DAS). On the Autonomy Center tab, you can enable the automatic scale-out and scale-in features. For more information, see Autonomy center.
  • Method 2:
    1. Log on to the PolarDB console.
    2. In the upper-left corner of the console, select the region where the cluster is deployed.
    3. On the Clusters page, click the ID of the cluster.
    4. In the Database Nodes section of the Overview page, click Settings in the upper-right corner.Settings
      Notice Only pay-as-you-go PolarDB for MySQL clusters support automatic scale-out and scale-in. Subscription clusters do not support automatic scale-out or scale-in.
    5. In the dialog box that appears, specify the following parameters.
      Parameter Description
      Auto Scaling-out Specify whether to enable the automatic scale-out feature.
      Observation Period During the observation period, if the CPU usage exceeds the specified value, PolarDB automatically adds nodes or upgrades the cluster to ensure that the cluster can handle the received read and write requests.
      CPU Usage The threshold for triggering automatic scale-out. If the CPU Usage is greater than or equal to the specified value, automatic scale-out is triggered.
      Maximum Specification The upper limit of the specifications to which the cluster can be scaled. After automatic scale-out is triggered, the system upgrades the specifications of the PolarDB cluster to the upper limit step by step. For example, the specifications are upgraded from 4 cores to 8 cores, and then to 16 cores.
      Note
      • If you upgrade a cluster, the existing data in clusters is not affected.
      • You may experience PolarDB service interruptions for a few seconds during specification changes. During this time, you cannot perform some operations. Make sure that your applications can automatically reconnect to the cluster.
      Maximum Number of Read-only Nodes The maximum number of read-only nodes that can be automatically added to the cluster for auto scaling. After automatic scale-out is triggered, the read-only nodes of the PolarDB cluster are added one by one until the upper limit is reached.
      Note The automatically added nodes are associated with the default endpoint of the cluster. If you use a custom endpoint, you must set the Automatically Associate New Nodes parameter to specify whether these nodes are automatically associated with the endpoint. For more information about Automatically Associate New Nodes, see Modify or delete a cluster endpoint.
      Auto Scaling-in Specify whether to enable the automatic scale-in feature.
      Note After you enable the feature, if the CPU usage is less than 30% for more than 99% of the observation period, automatic scale-in is triggered. The specifications of the PolarDB cluster are scaled to the original specifications step by step.
      Quiescent Period The minimum interval between two automatic scale-in operations or two scale-out operations. During a quiescent period, PolarDB continuously tracks whether the conditions for triggering automatic scale-out or scale-in are met. However, automatic scale-out or scale-in is not triggered. If a quiescent period and an observation period expire at the same time and the CPU usage reaches the threshold within the observation period, PolarDB automatically triggers auto scaling.
    6. Click OK.

Related API operations

API Description
ModifyDBNodeClass Changes the node specifications of a PolarDB cluster.