All Products
Search
Document Center

PolarDB:Manually upgrade or downgrade a PolarDB cluster

Last Updated:Apr 12, 2024

You can change the specifications of a PolarDB cluster based on your business requirements. If your cluster has a stable workload, we recommend that you manually upgrade or downgrade the cluster specifications when needed. This topic describes how to manually upgrade or downgrade a PolarDB cluster.

Prerequisites

No cluster configuration change tasks are being performed for the PolarDB cluster.

Billing

For more information about the fees for configuration changes, see Configuration change fees.

Precautions

  • Upgrading or downgrading a cluster does not affect the data stored in the cluster.

  • The time required to change specifications varies based on the number of compute nodes in the cluster. Each compute node requires approximately 5 minutes. For example, if a cluster contains two compute nodes, you need approximately 10 minutes to change the specifications. The time required to change specifications is also related to factors such as database loads and the number of databases and tables.

  • During the specification change 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 can automatically reconnect to the cluster.

  • A cluster upgrade or downgrade has minor impacts on the primary node of a PolarDB cluster but 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 a cluster and a node in the cluster.

  • During the specification change process, the cluster is restarted. The read-only nodes are restarted first, followed by the primary node. No primary/secondary switchover occurs.

Separately change the specifications of the primary node and read-only nodes

You can separately upgrade or downgrade the primary node and read-only nodes in a PolarDB cluster. You can select different specifications for the primary node and read-only nodes.

Limits

  • Each cluster must contain at least one read-only node that has the same specifications as the primary node.

  • Make sure that the specifications of the read-only nodes do not significantly differ from the specifications of the primary node:

    • The memory of a read-only node cannot be less than half of the memory of the primary node.

    • Make sure that the numbers of CPU cores of the primary node and read-only nodes meet the mapping relationships described in the following table.

      CPU cores of the primary node

      Minimum CPU cores of a read-only node

      2

      2

      4

      4

      8

      4

      16

      8

      32

      16

      64

      32

      88

      32

  • The specifications of the read-only nodes that serve as hot standby nodes must be the same as the specifications of the primary node. For more information about hot standby nodes, see Configure hot standby nodes.

  • For read-only column store nodes, we recommend that you use specifications higher than the specifications of the primary node. For more information, see Add a read-only column store node.

Note

PolarDB Multi-master Cluster (Database/Table) Edition clusters are not subject to the preceding limits.

Procedure

  1. Log on to the PolarDB console.

  2. In the top navigation bar, select the region in which the cluster that you want to manage is deployed.

  3. Open the Change Configuration 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. 集群列表

    • Method 2

      1. On the Clusters page, click the ID of the cluster that you want to manage.

      2. On the Basic Information page, click Change Configurations in the Database Nodes section. 升降配

  4. Select Upgrade or Downgrade based on your business requirements and then click OK.

    Note

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

  5. On the Upgrade/Downgrade page, configure the parameters. The following table describes the parameters.

    Parameter

    Description

    Resource Type

    The new category of the cluster. Valid values: General Specification and Dedicated Specification.

    Node Specification

    The new node specifications that you want to use.

    Note

    Make sure that at least one read-only node has the same specifications as the primary node.

    Switching Time

    You can select Switch Now or Switch At based on your business requirements. If you select Switch At, you can specify a point in time within the next 24 hours. Your cluster is upgraded or downgraded within 30 minutes after the specified point in time. On the Scheduled Tasks page, you can view the details of the task or cancel the task. For more information, see Scheduled tasks.

    Note

    You can configure the Switching Time parameter only if you select Upgrade or Downgrade for the cluster. If you select Temporary Upgrade, you cannot configure the parameter.

    Note

    You can upgrade or downgrade a cluster and a node in the cluster.

  6. Read and select the terms of service, click Buy Now, and then complete the payment.

  7. On the Purchase page, confirm the order information and click Subscribe.

    Note
    • During the specification change 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 can automatically connect to the cluster.

    • The time required to change specifications varies based on the number of compute nodes in the cluster. Each compute node requires approximately 5 minutes. For example, if a cluster contains two compute nodes, you need approximately 10 minutes to change the specifications. The time required to change specifications is also related to factors such as database loads and the number of databases and tables.

Related API operations

Operation

Description

ModifyDBNodeClass

Changes the node specifications of a PolarDB cluster.

ModifyDBNodesClass

Changes the specifications of a node in a PolarDB cluster.