All Products
Search
Document Center

ApsaraDB for ClickHouse:Modify the configurations of an ApsaraDB for ClickHouse cluster

Last Updated:Feb 29, 2024

When you need to adjust the configurations or scale of an ApsaraDB for ClickHouse cluster to cope with the continuous changes of your business, you can modify the cluster configurations. You can scale up, scale down, scale out, or scale in the ApsaraDB for ClickHouse cluster to help your business achieve an optimal balance between costs and performance.

Prerequisites

  • The configurations of your cluster are not being modified.

  • Your account has no unpaid renewal orders for the cluster.

    Note

    You can choose Expenses > User Center to log on to the Expenses and Costs console. In the left-side navigation pane, click Orders. On the Orders page, complete the payment of the order or cancel the order.

Feature description

You can perform the following operations to modify the configurations of an ApsaraDB for ClickHouse cluster:

  • Scale-up: Increase the node specifications and storage capacity of an ApsaraDB for ClickHouse cluster. This helps improve the computing power and storage capacity of the cluster. For more information, see the Scale-up and scale-down section of this topic.

  • Scale-down: Decrease the node specifications of an ApsaraDB for ClickHouse cluster. This helps reduce the computing power of the cluster. For more information, see the Scale-up and scale-down section of this topic.

    Note

    The storage capacity cannot be scaled down. The following content describes how to reduce the storage capacity:

    • If your ApsaraDB for ClickHouse cluster is a multi-node cluster, you can scale in one node to reduce the storage capacity based on your business requirements.

    • If your ApsaraDB for ClickHouse cluster is a standalone cluster, you can create another ApsaraDB for ClickHouse cluster and migrate data from your cluster to the newly created cluster to reduce the storage capacity.

  • Scale-out: For a cluster whose data is replicated or synchronized based on the original data, increase the number of cluster nodes to improve the computing power of the cluster. For more information, see the Scale-in and scale-out section of this topic.

  • Scale-in: For a cluster whose data is replicated or synchronized based on the original data, decrease the number of cluster nodes to reduce the computing power of the cluster. For more information, see the Scale-in and scale-out section of this topic.

Usage notes

  • When the system migrates MergeTree tables during cluster scale-out, the table data is written to a new cluster and automatically redistributed.

  • When the system migrates non-MergeTree tables such as external tables and log tables during cluster scale-out, only the table schemas are migrated and data is not migrated. When the system migrates materialized views during cluster scale-out, only the table schemas are migrated and data is not migrated.

  • After a cluster is scaled out, the IP addresses of the internal nodes change. If you want to write and query data based on the IP addresses of the nodes, you must obtain the CIDR block of the virtual private cloud (VPC) where the cluster is deployed. For more information, see Obtain the CIDR block of the VPC where a cluster is deployed.

  • After you modify the cluster configurations, you are charged for the cluster based on the new configurations. The fees on the buy page of the cluster in the ApsaraDB for ClickHouse console shall prevail. For more information, see Billing details about specification changes.

Impacts of scaling

  • Upgrading the storage type and increasing the storage capacity of a cluster do not affect the cluster. However, the cluster is restarted after the cluster specifications and ZooKeeper specifications are changed.

    Warning

    A cluster takes 10 to 15 minutes to restart. During the restart, a transient connection occurs. This interrupts data reads and writes. We recommend that you perform scaling during off-peak hours.

  • An ApsaraDB for ClickHouse cluster of version 20.8 or later supports read and write operations during cluster scale-out. To make sure that the scale-out task is completed at the earliest opportunity, we recommend that you stop writing data to the cluster that is being scaled out if about 95% of the scale-out task is complete. An ApsaraDB for ClickHouse cluster of version 20.3 or earlier supports read-only operations during cluster scale-out, and you can write data to the cluster only when the cluster scale-out task is complete.

  • An ApsaraDB for ClickHouse cluster supports read-only operations during cluster scale-in, and you can write data to the cluster only when the cluster scale-in task is complete.

Scale-up and scale-down

  1. Log on to the ApsaraDB for ClickHouse console.

  2. In the top navigation bar, select the region where the cluster is deployed.

  3. On the Clusters page, click the Default Instances tab and find the cluster that you want to manage.

  4. Click Change Configurations in the Actions column of the cluster. In the Change Configurations dialog box, select Scale Up or Scale Down and click OK.

  5. On the cluster upgrade or cluster downgrade page, modify the configurations based on your business requirements.

    Note

    If you want to modify the specifications and storage space of the cluster, you can modify only one of the Specification and Storage Capacity configurations at a time.

  6. Click Buy Now and follow the instructions to complete the payment.

  7. On the Pay page, click Console.

  8. On the Default Instances tab, view the state of the cluster in the Status column.

    Note
    • After you modify the storage space, the configuration modification immediately takes effect and the cluster is in the Running state.

    • After you modify the specifications, the configuration modification requires 10 to 15 minutes to take effect. If the state of the cluster changes from Changing Specification to Running, the scale-up or scale-down is successful.

Scale-in and scale-out

  1. Log on to the ApsaraDB for ClickHouse console.

  2. In the top navigation bar, select the region where the cluster is deployed.

  3. On the Clusters page, click the Default Instances tab and find the cluster that you want to manage.

  4. Click Change Configurations in the Actions column of the cluster. In the Change Configurations dialog box, select Scale Out or Scale In and click OK.

  5. In the scale-out or scale-in detection message, check whether the cluster is ready for scale-out or scale-in.

    • If the message "The scale-out detection is successful." or "The scale-in detection is successful." is displayed, click Next.

    • If an error occurs during the cluster detection, modify the cluster configurations as prompted and click Retry Detection. After the detection is successful, click Next.

      Causes of detection errors:

      • The unique distributed table is missing. No distributed table is created for a local table. You must create a distributed table for the local table.

      • More than one distributed table exists for a local table. Delete unnecessary distributed tables and retain only one distributed table for the local table.

  6. On the cluster upgrade or cluster downgrade page, increase or decrease the number of cluster nodes based on your business requirements.

  7. Click Buy Now and follow the instructions to complete the payment.

  8. On the Pay page, click Console.

  9. On the Default Instances tab, view the state of the cluster in the Status column. If the state of the cluster changes from Scale-out or Scale-in to Running, the scale-out or scale-in is successful.

Note
  • The configuration modification in the scale-out or scale-in process requires 10 to 15 minutes to take effect.

  • If data is directly written to a local table before the scale-out and data does not rely on data balancing between nodes before and after the scale-out, you can enable the simple capacity expansion mode to add nodes without balancing data between nodes. This reduces the waiting time during capacity expansion. If you have such a requirement, you can submit a ticket to contact Alibaba Cloud technical support.