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 PolarDB for MySQL cluster is of the Cluster Edition or Archive Database Cluster Edition. Single Node and Archive Database (High Compression Ratio) are not supported. For more information about cluster editions, see Editions.
  • No upgrade or downgrade task is 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.

Select different specifications for primary node and read-only nodes

For a PolarDB cluster, you can separately upgrade or downgrade the primary node and read-only nodes. This means that you can select different specifications for the primary node and read-only nodes.

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 node Minimum CPU cores for read-only node
      2 2
      4 4
      8 4
      16 8
      32 16
      64 32
      88 32
  • 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 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 where 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 Perform a temporary cluster upgrade.
  5. On the Upgrade/Downgrade page, select a node specification, specify Switching Time, read and accept the terms of service, and then click Buy Now.
    Note
    • In a cluster, ensure that at least one read-only node has the same specifications as the primary node.
    • You can upgrade or downgrade both clusters and individual nodes in a cluster.
    • You can specify Switching Time only after you select Upgrade or Downgrade. If you select Temporary Upgrade, you cannot specify Switching Time.
    • You 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.
  6. 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

Operation Description
ModifyDBNodeClass Changes the specifications of a PolarDB cluster.
ModifyDBNodesClass Change the specifications of a single node in a PolarDB cluster.