Scale a cluster

Updated at:
Copy as MD

ApsaraDB for SelectDB supports two scaling methods: scheduled elastic scaling for predictable workload patterns, and manual scaling for immediate configuration changes. Choose the right method based on your scenario, then follow the steps to execute the scaling operation.

Choose a scaling method

Factor Scheduled elastic scaling Manual scaling
Best for Predictable peak and off-peak hours Immediate response to changing needs
Automation Executes rules automatically at defined times Requires manual initiation
Supported billing type Pay-as-you-go clusters only Subscription and pay-as-you-go clusters
Cache behavior during scale-in Cache space scales proportionally with compute; data exceeding the target cache space is evicted, which may cause response time jitter Same cache eviction behavior applies
Mutual exclusivity Disables manual scaling while active Requires disabling the scheduled elastic policy first

Prerequisites

Before you begin, make sure that:

  • The instance status is Running

  • The target cluster status is Running

  • The Alibaba Cloud account has no unpaid orders

  • The Alibaba Cloud account has no overdue payment or insufficient balance (overdue or insufficient balance prevents scheduled rules from executing and manual scaling from completing)

Read and write operations may be briefly unavailable during scaling. Perform scaling during off-peak hours.

Scaling limits

Compute resource scaling

When you adjust compute resources, cache space scales proportionally based on the cluster's current compute-to-cache ratio. For example, a cluster with 8 CPU cores and 200 GB of cache space scales to 400 GB when you double the compute to 16 cores, or to 100 GB when you halve it to 4 cores.

Compute resources cannot be adjusted independently while keeping cache space unchanged.

Cache space scaling

  • Scale-out: Cache space can be scaled out independently without changing compute resources, or proportionally when scaling out compute resources.

  • Scale-in: Cache space cannot be scaled in independently. To reduce cache space, scale in compute resources at the same time.

To scale only compute resources or only cache space, create a new cluster with the target specifications and delete the old cluster.

Billing

Important

The fees described here are for reference only. Actual fees appear on your bill.

Each instance contains one or more Backend (BE) clusters. A pay-as-you-go instance contains only pay-as-you-go BE clusters. A subscription instance can contain both subscription and pay-as-you-go BE clusters.

Clusters in a subscription instance

Change type Cluster billing method How you are charged
Scale-out Subscription Fee = (Daily price after scale-out − Daily price before scale-out) × Remaining days until instance expires. Remaining days are calculated to 12 decimal places. For example, 31 days and 10 hours is recorded as 31.416666666667 days. For pricing details, see Billing items and pricing.
Pay-as-you-go Charged per hour at the new configuration rate. For the hour in which the change occurs, billing is prorated by minute. The bill is generated and payment is deducted at the end of that hour. For pricing details, see Billing items and pricing.
Scale-in Subscription Alibaba Cloud refunds the amount for the remaining subscription duration to your original payment method.
Pay-as-you-go Charged per hour at the new configuration rate. For the hour in which the change occurs, billing is prorated by minute. The bill is generated and payment is deducted at the end of that hour. For pricing details, see Billing items and pricing.

Clusters in a pay-as-you-go instance

After you change the configuration, billing continues at the hourly rate. For the hour in which the change occurs, billing is prorated by minute. The bill is generated and payment is deducted at the end of that hour.

For pricing details, see Billing items and pricing.

Set up scheduled elastic scaling

Scheduled elastic scaling automatically adjusts cluster compute resources at times you define. Each scaling operation takes about 10 minutes. Refresh the page to monitor status—when the cluster status changes from Changing Configuration to Running, the operation is complete.

Manual scaling is not supported while the scheduled elastic policy is enabled. To perform a manual scaling operation, disable the scheduled elastic policy first, complete the scaling, then re-enable the policy.

Scheduled scaling rule limits

Before creating or modifying rules, note the following:

  • Rule execution times cannot overlap with each other.

  • Rules must be at least 1 hour apart, which means a maximum of 23 rules per day.

  • Adjacent rules cannot target the same compute resource specifications. The last rule and the first rule in the list are considered adjacent.

Retry behavior

Scheduled rules execute only when both the instance and the cluster are in the Running state. If either is in another state—such as Paused, Restarting, or Upgrading—the system retries. If retries fail for more than 30 minutes, the rule is not executed.

Procedure

  1. Log on to the ApsaraDB for SelectDB console.

  2. In the upper-left corner, select the region where the instance resides.

  3. On the Instance List page, click the ID of the target instance to go to the Instance Details page.

  4. In the left navigation pane, click Cluster Management.

  5. On the Cluster Management page, click Scale in the Actions column of the target cluster.

  6. In the scaling panel, click the Scheduled Elastic Scaling tab.

  7. Manage rules as needed:

    • Add a rule: Click Add on the right side of the panel. If no rules exist yet, click Add Rule at the bottom of the panel. Configure the Execution Time and Target Compute Resource, then click Save. > Important: Rules are not executed until the Scheduled Elastic Policy is enabled.

    • Modify a rule: Click the edit icon in the Actions column of the target rule. Update the Execution Time or Target Compute Resource, then click Save.

    • Delete a rule: Click the delete icon in the Actions column of the target rule. Read the confirmation dialog, then click OK. > Note: If the two rules adjacent to the target rule have the same target compute resource specifications, deletion is blocked. If deletion reduces the total rule count below two, the system automatically disables the Scheduled Elastic Policy.

  8. Toggle the Scheduled Elastic Policy switch in the upper-left corner of the panel to enable or disable it.

    • Enabled: The system executes rules in sequence. Manual scaling is not available in this state.

    • Disabled: Rules are preserved but not executed.

    At least two rules are required to enable the policy.

Scheduled elastic scaling parameters

Parameter Description
Rule number A temporary sequence number assigned by execution time. The list is automatically re-sorted when you add or modify a rule.
Execution period The recurrence period. Defaults to Daily and cannot be changed.
Execution time The time at which the system runs the rule.
Target compute resource The target CPU and memory for the cluster after scaling. CPU range: 4–1,024 cores. Memory defaults to 4 GB per core. 1 CCU = 1 core and 4 GB of memory. To request a higher quota, contact Alibaba Cloud technical support.

Scale a cluster manually

Manual scaling lets you adjust compute resources and cache space on demand. Each scaling operation takes about 10 minutes. Refresh the page to monitor status—when the cluster status changes from Changing Configuration to Running, the operation is complete.

If the Scheduled Elastic Policy is enabled, disable it before performing manual scaling. After manual scaling completes, re-enable the policy.

Procedure

  1. Log on to the ApsaraDB for SelectDB console.

  2. In the upper-left corner, select the region where the instance resides.

  3. On the Instance List page, click the ID of the target instance to go to the Instance Details page.

  4. In the left navigation pane, click Cluster Management.

  5. On the Cluster Management page, click Scale in the Actions column of the target cluster.

  6. In the scaling panel, click the Manual Scaling tab.

  7. Configure the target specifications:

    Parameter Description
    Target compute resource The compute resources for the cluster, including CPU and memory. CPU range: 4–1,024 cores. Memory defaults to 4 GB per core. 1 CCU = 1 core and 4 GB of memory. To request a higher quota, contact Alibaba Cloud technical support.
    Target cache space (GB) The cache space for the cluster. Minimum: 100 GB for clusters with 4, 8, 16, or 32 CPU cores; 100 GB × selected cores / 32 for clusters with 64 or more CPU cores. Maximum: 500 × target core count. Unit: GB.
    Terms of Service Read and check the Terms of Service before proceeding.
  8. Click OK.

API reference

Operation API
Create a scheduled scaling rule CreateElasticRule
Modify a scheduled scaling rule ModifyElasticRule
Query scheduled scaling rules DescribeElasticRules
Delete a scheduled scaling rule DeleteElasticRule
Enable or disable a scheduled elastic policy EnDisableScalingRules
Scale a cluster ModifyDBCluster

References