Elastically Adding or Deleting DWS Logical Clusters
Context
Elastic logical clusters can be manually or automatically added or deleted. Elastic logical clusters can be created and deleted during the scheduled period of time to dynamically scale computing resources.
- A custom scheduled scaling plan creates a logical cluster that provides computing power. Once such logical cluster is associated, user's queries are handled by it, while table creation statements are still managed by the original logical cluster. For instructions on how to configure a custom scheduled scaling plan, see Configuring a Custom Scheduled Scaling Plan. This method is suitable if you have an understanding of your service workloads that fluctuate periodically and mainly involve query requests, such as periodic batch jobs.
- An auto scaling plan creates a logical cluster that facilitates parallel expansion. Once such logical cluster is associated with the primary logical cluster, specific queries from the primary logical cluster are routed to the logical cluster, but table creation statements are still executed in the original logical cluster. For how to configure an auto scaling plan, see Configuring an Auto Scaling Plan. This method is suitable if you are a beginner. It does not require knowledge of service workloads or manual intervention. It applies to workloads that mainly involve complex queries and jobs that may last for dozens of minutes to a few hours.
To reduce statement queuing time, use parallel expansion. When the primary logical cluster is overwhelmed by high-concurrency tasks and lacks resources like memory, DWS will automatically add extra cluster capacity to process the increased read and write statements. The performance and data consistency are consistent for users, regardless of whether the statement is executed on the primary logical cluster or the parallel extended cluster. You can set up a resource pool to control which statements are directed to a parallel extended logical cluster. When parallel expansion is enabled, qualifying statements are directed to the concurrent expansion cluster instead of being queued.
Notes and Constraints
- Logical clusters can be elastically added and deleted only in storage-compute decoupled clusters. Logical clusters can be automatically added and deleted only in storage-compute decoupled clusters using ECSs of version 9.1.0.200 or later.
- The fine-grained snapshot feature is automatically enabled in the cluster. An error will be reported when you create or delete a plan. You need to manually disable this feature.
- In a yearly/monthly storage-compute decoupled cluster, nodes are automatically added when logical clusters are added as scheduled. Nodes are billed on a pay-per-use basis.
Constraints for custom scheduled scaling plans:
- A user can be bound to only one elastic logical cluster.
- If a user associated with the read-only logical cluster has workloads in progress when the cluster is deleted, an error may be reported.
- To avoid affecting services and ensure resources are available at the scheduled time, the plan may be skipped if it conflicts with O&M operations, and may be executed about 20 minutes earlier than planned if the cluster creation is time-consuming.
- You are advised to manually add nodes to a logical cluster based on the following rules:
Constraints for auto scaling plans:
You are advised to enable and use the concurrent extension feature based on the following rules:
- Only V3 tables and foreign tables are supported. If the table is a replication table, only SELECT is supported.
- Only SELECT, INSERT, UPDATE, and DELETE statements are supported.
- COPY cannot be used to import data.
- The UPSERT statement is not supported.
- Transaction blocks are not supported.
- Stored procedures are not supported.
- Recursive statements with the RETURNING clause and WITH RECURSIVE are not supported.
- Lightweight update is not supported.
- INSERT statements generated by a single VALUES or generate_series are not supported.
Configuring a Custom Scheduled Scaling Plan
- Log in to the DWS console.
- In the navigation pane on the left, choose Cluster > Cluster List.
- In the cluster list, click the name of the target cluster to go to the Cluster Information page.
- In the navigation pane, choose Logical Clusters. On the displayed page, click Add Plan to configure a proper scheduling plan. Once Storage-Compute Decoupled clusters are created, they operate in logical cluster mode. You can only have up to two active plans at a time.

- Select a plan type. It can be:
- Periodicity: The plan is executed once in every specified period (week or month). A logical cluster is created or deleted as scheduled as long as it does not conflict with other O&M operations. Logical cluster creation may start later than the time you specified in case of a conflict with other operations.
Table 1 Parameters Parameter
Description
Cluster Name
Enter the name of the logical cluster. The logical cluster is mainly used to accelerate computing.
Bind Main Logical Cluster
Select a main logical cluster to be bound from the drop-down list.
Bind User
Select a user to be bound from the drop-down list. After a user was bound, tables created by the user are still in the original logical cluster, but their computing workloads are processed by the current logical cluster.
Nodes
Enter the number of nodes in the logical cluster.
Time Range
Select the start date and end date.
Period Type
Select Every Week or Monthly.
Time Configuration
Select the time when the creation is complete and the time when the deletion starts. If Period Type is set to Every Week, you can add one or more time segments.
- One-time: The plan is executed only once in the specified period.
Table 2 Parameters Parameter
Description
Cluster Name
Enter the name of the logical cluster. The logical cluster is mainly used to accelerate computing.
Bind Main Logical Cluster
Select a main logical cluster to be bound from the drop-down list.
Bind User
Select a user to be bound from the drop-down list. After a user was bound, tables created by the user are still in the original logical cluster, but their computing workloads are processed by the current logical cluster.
Nodes
Enter the number of nodes in the logical cluster.
Create Logical Cluster Before
Select the date when the creation is complete. The creation task will be triggered in advance so that the required logical cluster can be created within the time period you specified.
Delete Logical Cluster After
Select the date when the deletion starts.
- Periodicity: The plan is executed once in every specified period (week or month). A logical cluster is created or deleted as scheduled as long as it does not conflict with other O&M operations. Logical cluster creation may start later than the time you specified in case of a conflict with other operations.
- Click OK. In the scheduled plan list, you can view the plan details and next execution time.
Configuring an Auto Scaling Plan
- Log in to the DWS console.
- In the navigation pane on the left, choose Cluster > Cluster List.
- In the cluster list, click the name of the target cluster to go to the Cluster Information page.
- In the navigation pane, choose Logical Clusters to access the page for cluster management. Because once you have created a Storage-Compute Decoupled cluster, it will be in logical cluster mode.
- Enable Auto Resiliency Switch.
Once enabled, the system provisions idle nodes (which are free of charge) and monitors workload. It then automatically creates and deletes read-only elastic clusters during peak and off-peak hours, respectively.
Figure 1 Enabling auto scaling for logical clusters
- After auto resiliency is enabled, run SQL statements after completing the operation described in Using the SQL Editor to Connect to a Cluster to create and set a resource pool, and bind a user to the resource pool, and enable auto scaling for the specified resource pool. In the command, poolg indicates the resource pool name, which can be set as needed.
1 2 3
create resource pool "poolg" with(nodegroup = 'v3_logical'); alter user "write_user" with resource pool "poolg"; alter resource pool "poolg" with (enable_concurrency_scaling=true);
Figure 2 Setting a resource pool
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot

