ApsaraDB for SelectDB supports time-specific auto scaling and manual scaling for clusters. If your business has regular traffic peak and off-peak hours, you can use the scaling capabilities for the clusters in a SelectDB instance to flexibly adjust resources. This helps improve the resource usage and the overall performance of the system. If the configuration of a cluster in a SelectDB instance cannot meet your business requirements, you can manually change the configuration of the cluster.
Overview
Scaling type | Scenario | Impact |
Time-specific auto scaling | Your business has regular traffic peak and off-peak hours. | When you scale down a cluster, the cache size automatically changes together with the computing resources at the same ratio. If the size of cached data exceeds the new cache size, the excess data is deleted, and specific requests may encounter response jitters. |
Manual scaling | The configuration of the cluster cannot meet your business requirements. | When you reduce the cache size, if the size of cached data exceeds the new cache size, the excess part is deleted and specific requests may encounter response jitters. |
Prerequisites
The SelectDB instance is in the Running state.
The cluster in the SelectDB instance is in the Running state.
No unpaid orders exist within your Alibaba Cloud account.
Usage notes
If your Alibaba Cloud account has overdue payments or the balance of the Alibaba Cloud account is insufficient, the rules for time-specific auto scaling are invalid and not executed and manual scaling fails.
During the scaling process, read and write operations may not be supported for a short period of time. We recommend that you perform scaling operations during off-peak hours.
If you want to use time-specific auto scaling, take note of the following items:
Time-specific auto scaling is supported only for pay-as-you-go clusters.
The rules for time-specific scaling are valid and can be executed only when a cluster and the SelectDB instance to which the cluster belongs are in the Running state. If the cluster or instance is in other states, such as Stopped, Restarting, or Upgrading, the system waits for a retry. The rules for time-specific scaling cannot be executed when the cluster or instance does not run as expected for more than 30 minutes.
Billing rules
The fees described in this topic are for reference only. The fees displayed in the actual bills shall prevail.
Each SelectDB instance contains one or more backend (BE) clusters. A pay-as-you-go instance contains only pay-as-you-go clusters, but a subscription instance can contain subscription and pay-as-you-go instances. Therefore, if you change the configuration of a cluster, the billing rules for the cluster also change.
Change the configuration of a cluster in a subscription instance
Change type | Billing method of the cluster | Billing rule |
Scale up the cluster | Subscription | Fees for scaling up a subscription cluster = (Price per day after the scale-up - Price per day before the scale-up) × Number of remaining days before the instance expires. For more information, see Billable items and unit prices. Note The number of remaining days before an instance expires may not be an integer and is accurate to 12 decimal places. For example, if the number of remaining days before an instance expires is 31 days and 10 hours, it is recorded as 31.416666666667 days. |
Pay-as-you-go | After you scale up a pay-as-you-go cluster of an instance, you are charged for the cluster on an hourly basis based on the configuration of the cluster after the scale-up. During the hour when the configuration of the cluster is changed, you are charged fees by the minute separately before and after the change. Then, the system generates bills and deducts fees after the hour ends. For more information, see Billable items and unit prices. | |
Scale down the cluster | Subscription | After you scale down a subscription cluster of an instance, Alibaba Cloud refunds the amount that corresponds to the number of remaining days before the instance expires to your account balance based on the original payment method. |
Pay-as-you-go | After you scale down a pay-as-you-go cluster of an instance, you are charged for the cluster on an hourly basis based on the configuration of the cluster after the scale-down. During the hour when the configuration of the cluster is changed, you are charged fees by the minute separately before and after the change. Then, the system generates bills and deducts fees after the hour ends. For more information, see Billable items and unit prices. |
Change the configuration of a cluster in a pay-as-you-go instance
After you change the configuration of a cluster in a pay-as-you-go instance, the billing rules of the cluster remain unchanged and you are still charged for the cluster on an hourly basis. During the hour when the configuration of the cluster is changed, you are charged fees by the minute separately before and after the change. Then, the system generates bills and deducts fees after the hour ends. For more information, see Billable items and unit prices.
Procedure
It requires approximately 10 minutes to scale a cluster each time. You can refresh the page to view the current status of the cluster. If the status of the cluster changes from Changing Specifications to Running, the cluster is scaled.
Perform time-specific auto scaling
Log on to the ApsaraDB for SelectDB console.
In the top navigation bar, select the region in which the instance that you want to manage resides.
In the left-side navigation pane, click Instances. On the page that appears, find the required instance and click the instance ID to go to the Instance Details page.
In the left-side navigation pane of the Instance Details page, click Cluster Management.
On the page that appears, find the required cluster and click Scale in the Actions column.
In the panel that appears, click the Time-sharing Auto Scaling tab.
Perform the following operations as prompted:
ImportantBefore you create or modify a time-specific auto scaling rule, you must be familiar with the following limits:
The execution time of rules must be different.
The execution interval between two adjacent rules must be at least one hour. You can configure up to 23 rules.
The specification of the required computing resources must be unique for adjacent rules. In the rule list, the last rule and the first rule are adjacent rules.
When rules are executed, the cache size of the cluster automatically changes with the computing resources at the same ratio. If the cluster is scaled down, the new cache size can be the lower limit of the cache size that is supported by the new computing resources. Examples:
Scale-up: The cluster provides 4 CPU cores, 16 GB of memory, and 100 GB of cache size. If you expand the computing resources to 64 CPU cores and 256 GB of memory, the cache size increases to 1,600 GB. The value is obtained by using the following calculation: 100 GB × (64 CPU cores/4 CPU cores).
Scale-down: The cluster provides 64 CPU cores, 256 GB of memory, and 400 GB of cache size. If you reduce the computing resources to 8 CPU cores and 32 GB of memory, the cache size decreases to 100 GB. The value is obtained by using the following calculation: Max[100 GB, 400 GB × (8 CPU cores/64 CPU cores)].
Use time-specific auto scaling.
In the upper-left corner of the tab, click Time-sharing Auto Scaling.
NoteYou can enable time-specific auto scaling only when at least two rules exist.
Enabled: The system executes the existing rules in sequence. In this case, manual scaling is no longer supported.
Disabled: The system does not execute or delete the existing rules.
Create a time-specific auto scaling rule.
ImportantAfter you create a rule, if time-specific auto scaling is disabled, the system does not execute the rule.
Click Create in the upper-right corner of the tab, configure the Execution Time and Required Computing Resource parameters, and then click Save.
If you do not create rules, you can click Create Rule at the bottom of the tab to configure the preceding parameters.
Modify a time-specific auto scaling rule.
Find the required rule, click the
icon in the Actions column, modify the Execution Time and Required Computing Resource parameters, and then click Save. View a time-specific auto scaling rule.
Click the Time-sharing Auto Scaling tab. The system automatically displays rules on the Time-sharing Auto Scaling tab, and you can click the Manual Scaling tab to view the corresponding rules.
Delete a time-specific auto scaling rule.
Find the required rule, click the
icon in the Actions column, and then read and confirm the message that appears. Then, click OK. After you delete the rule, if the number of rules is less than 2, time-specific auto scaling is automatically disabled and cannot be enabled.
NoteIf the specifications of the computing resources for the adjacent rules of a rule are the same, you cannot delete the rule.
In the rule list, the last rule and the first rule are adjacent rules.
Parameter
Description
Rule
The temporary sequence number of the rule. By default, the rules are arranged based on the execution time. After you create or modify a rule, if the execution time of the rule is between other rules, the system automatically reorders the rule list.
Execution Cycle
The execution cycle of the rule. Default value: Every Day. You cannot change the value.
Execution Time
The time when you want the system to execute the rule.
Required Computing Resource
The specification of the computing resources that you want to scale for the cluster, including CPU cores and memory resources.
By default, the number of CPU cores in each cluster ranges from
4 to 1,024.By default, the memory size is four times the number of vCPUs. Unit: GB.
ImportantA compute capacity unit (CCU) is equal to the computing power of a CPU core and 4 GB of memory.
If you want to increase the quota, contact Alibaba Cloud technical support.
Perform manual scaling
If time-specific auto scaling is enabled, manual scaling is not supported. If you want to temporarily perform manual scaling, you must disable time-specific auto scaling. After manual scaling is complete, you can enable time-specific auto scaling again.
Log on to the SelectDB console.
In the top navigation bar, select the region in which the instance that you want to manage resides.
In the left-side navigation pane, click Instances. On the Instances page, click the ID of the instance to go to the Instance Details page.
In the left-side navigation pane of the Instance Details page, click Cluster Management.
On the page that appears, find the required cluster and click Scale in the Actions column.
In the panel that appears, click the Manual Scaling tab.
Configure the required parameters.
The specification of computing resources and the cache size can be separately and simultaneously changed. If the specification of computing resources and the cache size are separately changed, make sure that the specification of the computing resources or the cache size that is not changed remains unchanged.
The cache size can increase without the need to change the specification of the computing resources.
The specification of the computing resources can be scaled up without the need to change the cache size.
If the specification of the computing resources and the cache size are simultaneously changed, the specification of the computing resources and the cache size are changed.
Parameter
Description
Required Computing Resources
The specification of the computing resources that you want to scale for the cluster, including CPU cores and memory resources.
By default, the number of CPU cores in each cluster ranges from
4 to 1,024.By default, the memory size is four times the number of vCPUs. Unit: GB.
ImportantA CCU is equal to the computing power of a CPU core and 4 GB of memory.
If you want to increase the quota, contact Alibaba Cloud technical support.
Required Cache Size (GB)
The cache size of the cluster.
Valid values:
Minimum value:
If the cluster provides 4, 8, 16, or 32 CPU cores, the minimum value is 100 GB.
If the cluster provides 64 or more CPU cores, the minimum value is calculated by using the following calculation:
100 GB × Number of the required CPU cores/32.
Maximum value:The value is
500 times the number of the required CPU cores.
Unit: GB.
Terms of Service
The agreement. Read and select Terms of Service.
Click OK.