This topic describes the logic and methods that are used to upgrade node specifications and add nodes.

Upgrading node specifications and adding nodes

In PolarDB-X, you can use the following methods to upgrade node specifications or add nodes:

  • Upgrade the specifications of existing nodes, such as CPU, memory, and IOPS. The total number of nodes remains unchanged.

    The specifications of nodes are preferentially upgraded on the hosts on which the nodes are deployed. For example, if you want to change 4 cores to 8 cores for a node and the host on which the node is deployed has idle CPU resources, you can change the specification from 4 cores to 8 cores. This method requires a short period of time especially when you use this method to upgrade data nodes. This is because data on the data nodes does not need to be migrated. If the hosts on which nodes are deployed have insufficient resources to upgrade node specifications, the nodes are migrated to other hosts. This process requires a longer period of time.

    In most cases, the nodes that use low specifications can be upgraded on the hosts on which the nodes are deployed. Nodes can be downgraded on the hosts on which the nodes are deployed.

  • Add nodes. You can add compute nodes and data nodes without changing the specifications of the nodes.

    If you add nodes, data loads are balanced among the nodes. In this case, data must be migrated. The time required to migrate data is positively correlated with the amount of data that you want to migrate. If you want to reduce nodes, data must also be migrated.

    In most cases, you can upgrade node specifications on the hosts on which the nodes are deployed. This method is lightweight. If you want to add nodes, data must be migrated. This method is complex.

    You can determine whether to upgrade node specifications or add nodes based on the following rules:
    • When insufficient resources exist due to factors such as business traffic spikes or peak hours, preferentially upgrade node specifications. This can help you quickly solve performance bottleneck issues. During off-peak hours, you can downgrade node specifications to save resources. This method is easy to use.
    • If you want to allocate more resources for operations such as daily development and O&M based on your plan, preferentially add nodes. This way, a single node can use low specifications. In emergencies, you can upgrade the specifications on the host on which the node is deployed.
    • After you upgrade node specifications, the disk capacity of the node is not increased. If the disk capacity is insufficient, add nodes.

Conditions for node specification upgrade and node addition

For online transactions, your data loads cannot exceed 30% of the threshold per day. In most cases, this value is the recommended value. This way, burst traffic such as the traffic during promotional events and the traffic that is caused by service code bugs can be handled. You can adjust the threshold based on business characteristics. For example, if the traffic of your business periodically fluctuates or business promotion events are held, you can adjust the threshold.

Take note of the following metrics for loads on compute nodes:
  • CPU utilization
  • Number of active threads
  • Response time (RT) divided into logical RT and physical RT
Take note of the following metrics for loads on data nodes:
  • CPU utilization
  • IOPS usage
  • Number of active sessions

It takes some time to add nodes. You must add nodes before disk capacity is insufficient in scenarios where the disk capacity may be a bottleneck issue. We recommend that you add nodes when the occupied disk space exceeds 70% of the disk capacity.