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
No cluster specification change tasks are being performed for the PolarDB cluster.
Billing
For more 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 cluster 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.
Separately change the specifications of the primary node and read-only nodes
The primary node and read-only nodes can be separately upgraded or downgraded for a PolarDB cluster. This means that 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 those of the primary node.
We recommend that you select similar 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 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 those of the primary node. For more information about hot standby nodes, see Configure hot standby nodes.
We recommend that you specify higher specifications for read-only column store nodes than 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 top navigation bar, select the region in which the cluster that you want to manage is deployed.
You can 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.
On the Basic Information page, click Change Configurations in the Database Nodes section.
Select Upgrade or Downgrade based on your business requirements and click OK.
NoteOnly subscription clusters support Temporary Upgrade. For more information, see Perform a temporary cluster upgrade.
On the Upgrade/Downgrade page, configure the following parameters:
Component
Description
Resource Type
The new category of the cluster. Valid values: General Specification and Dedicated Specification.
Node Specifications
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 set Switching Time to Switch Now or Switch At. If you select Switch At, you can specify a point in time within the next 24 hours. Your cluster will be 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 task.
NoteYou can specify Switching Time only after you select Upgrade or Downgrade. If you select Temporary Upgrade, you cannot specify Switching Time.
NoteYou can upgrade or downgrade both clusters and individual nodes in a 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 Purchase.
NoteDuring 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 operation
API | Operation |
Changes the node specifications of a PolarDB cluster. | |
Changes the specifications of a single node in a PolarDB cluster. |