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 use the same specifications.

Billing rules

You are charged for newly added nodes based on the following billing rules:
  • If nodes are added to a subscription cluster, you are charged based on the subscription billing method.
  • If nodes are added to a pay-as-you-go cluster, you are charged on an hourly basis.
Note
  • You can release subscription or pay-as-you-go read-only nodes based on your business requirements. After you release a node, the system refunds fees for the remaining subscription period or stops billing. For more information, see Configuration change fees.
  • The nodes that you add are billed based on the node specifications. For more information, see Billable items. The storage fee varies based on the used storage space, regardless of the number of nodes.

Precautions

  • You can add or remove read-only nodes only when the cluster does not have pending specification changes.
  • To avoid accidental operations, only one read-only node can be added or removed at a time. To add or remove multiple read-only nodes, repeat the operation for multiple times.
  • It takes about five minutes to add or remove a read-only node. When PolarDB adds nodes to a cluster, the databases in the cluster are not affected.
  • When PolarDB removes a read-only node from a cluster, connections to the node are closed. The connections to other nodes in the cluster are not affected. We recommend that you remove nodes during off-peak hours and make sure that your applications are configured with the automatic reconnection mechanism.

Add a read-only node

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster is deployed.
  3. You can use the following methods to access the Add/Remove Node dialog box.
      • Find the cluster and click more in the Actions column. Cluster
      • Click Add/Remove Node.Cluster list
    • Find the cluster and click the cluster ID. On the Overview page, click Add/Remove Node in the Database Nodes section. Overview
  4. Select Add Node and click OK.
    Add/Remove Node
  5. Click the + icon, read and select the Terms of Service, and then click Buy Now.
  6. On the Purchase page, confirm the order information and click Purchase.

Remove a read-only node

  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster is deployed.
  3. You can use the following methods to go to the Add/Remove Node dialog box. You can use the following methods to change the specifications:
    • Find the cluster and click Add/Remove Node in the Actions column. Cluster list
    • Find the cluster and click the cluster ID. On the Overview page, click Add/Remove Node in the Database Nodes section. Overview
  4. Select Remove Node and click OK.
    Add/Remove Node
  5. Click the - icon next to the node that you want to remove. In the dialog box that appears, click OK.
    Note You must retain at least one read-only node in the cluster to ensure high availability.
  6. Read and select the Terms of Service, and then click Buy Now.

Related API operations

API Description
CreateDBNodes Adds read-only nodes to a PolarDB cluster.
ModifyDBNodesClass Changes the specifications of a single node in a PolarDB cluster independently.
ModifyDBNodeClass Changes the node specifications of a PolarDB cluster.
RestartDBNode Restarts a specified node in a PolarDB cluster.
DeleteDBNodes Removes a read-only node from a PolarDB cluster.