If your ClickHouse cluster cannot accommodate your increasing business workloads, you must scale out the ClickHouse cluster. You can scale out a ClickHouse cluster by shard or replica. If the capacity of a ClickHouse cluster cannot meet your business requirements, you can scale out the ClickHouse cluster by shard. If the maximum number of parallel access requests that are supported by a ClickHouse cluster cannot meet your business requirements, you can scale out the ClickHouse cluster by replica. This topic describes how to scale out a ClickHouse cluster.
Prerequisites
An E-MapReduce (EMR) ClickHouse cluster is created. For more information, see Create a ClickHouse cluster.
Usage notes
- The number of nodes that are added must be a multiple of the number of shards or replicas.
- When you scale out a ClickHouse cluster, you can migrate only the schemas of tables. You cannot migrate the data in the tables.
- You cannot migrate the schemas of the tables in the default database.
- If you scale out a ClickHouse cluster by shard, new nodes are added to the ClickHouse cluster. Distributed tables and local tables are created on the new nodes. After you scale out the cluster, data is written based on the original distribution policy.
Procedure
- Go to the management page of the cluster.
- Log on to the EMR console. In the left-side navigation pane, click EMR on ECS.
- In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.
- On the EMR on ECS page, find the cluster that you want to manage and click Nodes in the Actions column.
- On the Nodes tab, find the node group that you want to scale out and click Scale Out in the Actions column.
- In the Scale Out dialog box, set the parameters as needed. The following table describes the parameters.
Parameter Description ClickHouse Scale-out Method Shard expansion If the capacity of your ClickHouse cluster cannot meet your business requirements, select this method. Replica expansion If the maximum number of parallel access requests that are supported by a ClickHouse cluster cannot meet your business requirements, select this method. Added Instances The number of nodes that are added. The value of this parameter must be a multiple of the number of shards or replicas. Terms of Service Read the terms of service and select this option. - Click OK.