After you create PolarDB clusters, you can manually add or remove read-only nodes to or from the clusters.
Background information
Billing methods of new nodes
You are charged for the nodes that are added to an existing cluster based on the following
billing methods:
- If nodes are added to a subscription cluster, you are charged for the added nodes based on the subscription billing method.
- If nodes are added to a pay-as-you-go cluster, you are charged for the added nodes on a pay-as-you-go basis.
Note
- You can release read-only nodes whose billing methods are subscription and pay-as-you-go. After you release the nodes, the system refunds fees for the remaining subscription period or stops billing. For more information, see Configuration change fees.
- Only the node specifications of the added nodes are charged. For more information, see Billable items. The storage fee is charged based on the amount of the used storage space, regardless of the number of nodes.
Considerations
- You can add or remove read-only nodes only when the cluster does not have pending configuration changes.
- To avoid misoperations, you can add or remove only one read-only node at a time. To add or remove multiple read-only nodes, you must repeat the operation for multiple times.
- It takes about 5 minutes to add or remove a node.
Add a read-only node
Note A read/write splitting connection that is created after a read-only node is added
forwards requests to the read-only node. A read/write splitting connection that is
created before a read-only node is added does not forward requests to the read-only
node. You must close the current connection and establish the connection again. For
example, you can restart the application to establish the connection.
Remove a read-only node
Related API operations
API | Description |
---|---|
CreateDBNodes | Adds a read-only node to a PolarDB cluster. |
ModifyDBNodeClass | Changes the node specifications of a PolarDB cluster. |
RestartDBNode | Restarts a specified node in a PolarDB cluster. |
DeleteDBNodes | Deletes read-only nodes from a PolarDB cluster. |