You can manually add or remove read-only nodes after you create a PolarDB cluster.
Background information
A PolarDB cluster can contain up to 15 read-only nodes. Each cluster must have at least one read-only node to ensure high availability. All nodes in a cluster have the same specifications.
Select different specifications for the primary node and read-only nodes
You can add read-only nodes based on your required specifications. The specifications can be different from the specifications of the primary node.
Limits
At least one read-only node in the cluster must have the same specifications as the primary node.
Make sure that the specifications of new read-only nodes do not differ greatly from the specifications of the primary node.
The memory size of a new read-only node must be at least half of the memory size of the primary node.
The number of CPU cores of a new read-only node must have the following mapping relationships with the number of CPU cores of the primary node.
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 read-only nodes that serve as hot standby nodes must have the same specifications as the primary node.
Billing rules
You are charged for new nodes based on the following billing rules:
If you add a read-only node to a subscription cluster, the new node is also billed on the subscription billing method.
If you add a read-only node to a pay-as-you-go cluster, the new node is also billed on the pay-as-you-go billing method.
You can release subscription or pay-as-you-go read-only nodes based on your business requirements. After you release a node, the system issues refunds for the remaining subscription period or stops billing. For more information, see Configuration change fees.
The fees for the nodes that you add vary based on the node specifications. For more information, see Billable items. The storage fees are based on the actual storage usage and are not influenced by the number of nodes.
Precautions
You can add or remove read-only nodes only when the cluster does not have pending configuration changes.
To avoid accidental operations, you can add or remove only one read-only node at a time. To add or remove multiple read-only nodes, repeat the operation multiple times.
A read-only node can be added or removed in approximately 5 minutes. When PolarDB adds nodes to a cluster, the databases in the cluster are not affected.
When the system removes a read-only node from a cluster, connections to the read-only node are closed. The connections to other nodes in the cluster are not affected. We recommend that you remove read-only nodes during off-peak hours and make sure that your applications can automatically reconnect to the cluster.
Add a read-only node
Log on to the PolarDB console.
In the upper-left corner of the PolarDB console, select the region in which the cluster is deployed.
Access the Add/Remove Node dialog box by using one of the following methods:
Find the cluster and choose More > Add/Remove Node in the Actions column.
Find the cluster and click the cluster ID. On the Basic Information page, click Add/Remove Node in the Database Nodes section.
Select Add Node and click OK.
Click the + icon, read and select the terms of service, and then click Buy Now.
On the Purchase page, confirm the order information and click Purchase.
Remove a read-only node
Log on to the PolarDB console.
In the upper-left corner of the PolarDB console, select the region in which the cluster is deployed.
Access the Add/Remove Node dialog box by using one of the following methods:
Find the cluster and choose More > Add/Remove Node in the Actions column.
Find the cluster and click the cluster ID. On the Basic Information page, click Add/Remove Node in the Database Nodes section.
Select Delete Node and click OK.
Click the - icon next to the node that you want to remove. In the dialog box that appears, click OK.
NoteYou must retain at least one read-only node in the cluster to ensure high availability.
Read and select the terms of service and then click Buy Now.
Related API operations
Operation | Description |
Adds a read-only node to a PolarDB cluster. | |
Changes the specifications of a single node in a PolarDB cluster. | |
Changes the node specifications of a PolarDB cluster. | |
Restarts a node in a PolarDB cluster. | |
Removes a read-only node from a PolarDB cluster. |