You can change the configurations 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 cluster does not have pending specification changes.

Background information

PolarDB supports online scale-out. You do not need to lock databases when you change the cluster configurations. PolarDB supports scaling in the following dimensions:

  • Vertical scaling of the computing capacity: Upgrade or downgrade cluster specifications. This topic describes the details of this capacity scaling dimension.
  • Horizontal scaling of the computing capacity: Add or remove read-only nodes. For more information, see Add or remove read-only nodes.
  • Horizontal scaling of 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. If you want to store large volumes of data, we recommend that you use storage plans to reduce costs.

Configuration change fees

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. For more information, see Automatic specification change.

Considerations

  • You can upgrade or downgrade only the specifications for a cluster. You cannot upgrade or downgrade specifications for a single 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 configurations
  4. Select Upgrade or Downgrade based on your business requirements, and click OK.
    Configuration wizard
    Note

    Only subscription clusters support Temporary Upgrade. For more information, see Perform a temporary upgrade.

  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.
    • 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.
  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:

  • The diagnostics feature of PolarDB for MySQL integrates with some features of 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 will add nodes or upgrade the cluster based on the real-time read and write requests to the cluster.
      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 when the cluster is upgraded. 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 will be automatically associated with the endpoint. For more information about Automatically Associate New Nodes, see Modify and delete a cluster endpoint.
      Auto Scaling-in Specify whether to enable the automatic scale-in feature.
      Quiescent Period The minimum interval between two automatic scale-in operations or two scale-out operations. During a quiescent period, PolarDB continues tracking whether the conditions for triggering automatic scale-out or scale-in are met. However, automatic scale-out or scale-in are 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 when the quiescent period and the observation period expire.
    6. Click OK.

Related API operations

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