All Products
Search
Document Center

PolarDB:Add or remove a read-only node

Last Updated:Apr 09, 2024

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.

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

  1. Log on to the PolarDB console.

  2. In the upper-left corner of the PolarDB console, select the region in which the cluster is deployed.

  3. 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.基本信息

  4. Select Add Node and click OK.

    增删节点向导

  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 PolarDB console, select the region in which the cluster is deployed.

  3. 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.基本信息

  4. Select Delete Node and click OK.

    删除节点向导

  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

Operation

Description

CreateDBNodes

Adds a read-only node to a PolarDB cluster.

ModifyDBNodesClass

Changes the specifications of a single node in a PolarDB cluster.

ModifyDBNodeClass

Changes the node specifications of a PolarDB cluster.

RestartDBNode

Restarts a node in a PolarDB cluster.

DeleteDBNodes

Removes a read-only node from a PolarDB cluster.