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.
Procedure
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. |