PolarDB allows you to change the specifications of a cluster to meet business requirements. If your PolarDB cluster does not need to handle workload fluctuations, we recommend that you manually upgrade or downgrade the cluster. This topic describes how to manually upgrade or downgrade a PolarDB cluster.

Prerequisites

  • The edition of the PolarDB for MySQL cluster is Cluster Edition, Multi-master Cluster (Database/Table) Edition, or X-Engine Edition. Single Node Edition is not supported. For more information about cluster editions, see Overview.
  • No cluster specification change tasks are being performed for the PolarDB cluster.

Billing

For information about the billing rules, see Configuration change fees.

Precautions

  • When you upgrade or downgrade a cluster, data stored in the cluster is not affected.
  • The time for specification changes is related to the number of compute nodes in the cluster. It takes about 5 minutes per compute node. For example, if a cluster contains two compute nodes, it takes about 10 minutes to change the specifications. In addition, the time for specification changes is also related to factors such as database loads and the number of databases and tables.
  • During the upgrade or downgrade process, a transient connection to each endpoint occurs for no more than 30 seconds. We recommend that you upgrade or downgrade your cluster during off-peak hours and make sure that your applications are configured with the automatic reconnection mechanism.
  • A cluster upgrade or downgrade has minor impacts on the primary node of a PolarDB cluster. However, the upgrade or downgrade degrades the performance of read-only nodes in the cluster. As a result, the read-only nodes require more time to handle requests during the upgrade or downgrade process.
  • You can upgrade or downgrade both clusters and individual nodes in a cluster.
  • During the specification change, the cluster is restarted and the primary/secondary switchover does not occur. The restart of read-only nodes is followed by the restart of the primary node.

Select different specifications for primary node and read-only nodes

PolarDB clusters support changing the specifications of the primary node and read-only nodes separately. This means that the specifications of read-only nodes do not have to be consistent with those of the primary node.

Limits

  • In a cluster, ensure that at least one read-only node has the same specifications as the primary node.
  • We recommend that you select close specifications for the primary node and read-only nodes:
    • The memory of a read-only node cannot be less than half of the memory of the primary node.
    • The following table lists the correspondence of CPU specifications for the primary node and read-only nodes.
      CPU cores for primary nodeMinimum CPU cores for read-only node
      22
      44
      84
      168
      3216
      6432
      8832
  • Read-only nodes must be of the same specifications as the primary node if hot standby nodes are configured.
  • We recommend that read-only column store nodes use higher specifications than the primary node if read-only column store nodes are added.
Note PolarDB Multi-master Cluster (Database/Table) Edition Edition clusters are not subject to the preceding limits.

Procedure

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region in which the cluster that you want to manage is deployed.
  3. You can open the Change Configurations dialog box by using one of the following methods:
    • Method 1
      On the Clusters page, find the cluster that you want to manage and click Change Configurations in the Actions column. Clusters
    • Method 2
      1. On the Clusters page, click the ID of the cluster.
      2. On the Overview page, click Change Configurations in the Database Nodes section. Change specifications
  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 Temporary upgrade.
  5. On the Upgrade/Downgrade page, configure the following parameters.
    ParameterDescription
    Resource TypeThe new category of the cluster. Valid values: General Specification and Dedicated Specification.
    NodeThe new node specifications that you want to use.
    Note Make sure that one read-only node has the same specifications as the primary node and you can determine the specifications of other read-only nodes.
    PolarProxy TypeThe new PolarProxy type of the cluster. Valid values: Standard Enterprise and Dedicated Enterprise.
    • Standard Enterprise: is used when Resource Type is set to General Specification.
    • Dedicated Enterprise: is used when Resource Type is set to Dedicated Specification.
    Switching TimeYou can set Switching Time to Switch Now or Switch At. If you select Switch At, you can specify a point in time within the following 24 hours. Your cluster will be upgraded or downgraded within 30 minutes after the specified point in time. You can view the details about the scheduled task on the Scheduled Tasks page, or cancel the task. For more information, see View or cancel a scheduled task.
    Note You can specify Switching Time only after you select Upgrade or Downgrade. If you select Temporary Upgrade, you cannot specify Switching Time.
    Note You can upgrade or downgrade both clusters and individual nodes in a cluster.
  6. Read and accept the terms of service and then click Buy Now.
  7. On the Purchase page, confirm the order information and click Purchase.
    Note
    • During the upgrade or downgrade process, your applications are temporarily disconnected from each endpoint for no more than 30 seconds. We recommend that you upgrade or downgrade your cluster during off-peak hours and make sure that your applications are configured with the automatic reconnection mechanism.
    • The time for specification changes is related to the number of compute nodes in the cluster. It takes about 5 minutes per compute node. For example, if a cluster contains two compute nodes, it takes about 10 minutes to change the specifications. In addition, the time for specification changes is also related to factors such as database loads and the number of databases and tables.

Related API operations

OperationDescription
ModifyDBNodeClassChanges the specifications of a PolarDB cluster.
ModifyDBNodesClassChanges the specifications of a single node in a PolarDB cluster.