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.
If the failover with hot replica feature is not enabled for the cluster, the specification change may cause a transient connection that lasts 20 to 30 seconds. Make sure that your applications can automatically reconnect to the cluster. If the failover with hot replica feature and the binary logging feature are enabled for the cluster, the specification change may cause a transient connection that lasts 5 to 10 seconds. If the failover with hot replica feature is enabled while the binary logging feature is not enabled for the cluster, the cluster may stop providing service for one to three seconds during the specification change, but the connections and transactions are not interrupted.
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
2
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.
PolarDB Multi-master Cluster (Database/Table) Edition clusters are not subject to the preceding limits.
Procedure
Log on to the PolarDB console.
In the upper-left corner, select the region in which the cluster is deployed.
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
On the Clusters page, click the ID of the cluster that you want to manage.
On the Basic Information page, click Change Configurations in the Database Nodes section.
Select Upgrade or Downgrade based on your business requirements and then click OK.
NoteOnly subscription clusters support Temporary Upgrade. For more information, see Perform a temporary cluster upgrade.
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.
NoteMake 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.
NoteYou 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.
NoteYou can upgrade or downgrade a cluster and a node in the cluster.
Read and select the terms of service, click Buy Now, and then complete the payment.
On the Purchase page, confirm the order information and click Subscribe.
NoteDuring 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 |
Changes the node specifications of a PolarDB cluster. | |
Changes the specifications of a node in a PolarDB cluster. |