This topic describes how to manually scale in the storage capacity of an ApsaraDB RDS for MySQL instance that uses cloud disks to reduce resource waste and costs. During the scale-in, you can also downgrade the ESSD performance level (PL) and the instance type to optimize your resource configuration.
Prerequisites
-
Your ApsaraDB RDS for MySQL instance must meet the following requirements. You can view the instance details on the Basic Information page:
-
Major engine version: 5.7 or 8.0
-
Minor engine version: 20210430 or later.
-
Storage type: ESSD or premium performance disk. Standard SSDs are not supported.
NoteIf your instance uses a standard SSD, you must first upgrade it to an ESSD before you can scale in its storage capacity.
-
Instance architecture: Only the new architecture (kindcode=18) is supported.
NoteYou can call the DescribeDBInstanceAttribute operation to query the instance architecture. If the instance uses the old architecture (kindcode=1 or 3), you must first upgrade the minor engine version to adopt the new architecture before scaling in.
-
The instance is in the Running state and the log backup feature is enabled.
-
-
Your Alibaba Cloud account has no unpaid renewal orders.
NoteIf you have unpaid renewal orders, go to the ApsaraDB RDS console. In the upper-right corner, hover over Fee, and click Orders. On the Orders page, pay for or cancel the orders.
-
To scale in a read-only instance, its primary instance must be in the Running state.
Limitations
-
Scale-in frequency: You can manually scale in the storage capacity a maximum of two times per day. Avoid frequent scale-in operations to prevent service disruptions.
-
Scale-in conditions and formula:
-
You can scale in the storage capacity only for instances of the same series and architecture.
-
After a scale-in, the new storage capacity must be greater than or equal to the value from the formula
min{Used storage × 1.3, Used storage + 400 GB}and cannot be less than the minimum allowed for the current instance type. The storage capacity can be adjusted in 5 GB increments.
-
-
Primary and read-only instances: The storage capacity of a read-only instance must be greater than or equal to that of its primary instance. We recommend scaling in the storage capacity of the primary instance before the read-only instance.
-
Scale-in duration and service traffic: The time required for a scale-in operation depends on the used storage and service traffic. If your instance handles high service traffic, we recommend that you adjust the local log retention policy by increasing the retention period and the number of log files. This improves the efficiency and success rate of the scale-in operation.
Binlog requirements: If the Binlog of an instance grows rapidly, you must ensure that a sufficient number of logs are retained locally before you can scale in the instance. To enable log backup, see Modify an RDS backup policy.
-
Backup tasks: The scale-in process may cancel a running backup task. We recommend that you perform the scale-in operation after the current backup is complete.
Impact
A manual scale-in of storage capacity causes a transient connection interruption that lasts for about 15 seconds. During this period, most operations related to databases, accounts, and networks are unavailable. We recommend performing this operation during off-peak hours and ensuring your application has an automatic reconnection mechanism.
Billing
For information about billing changes, see Billing rules for instance configuration changes.
Procedure
Pay-as-you-go and subscription
-
Go to the ApsaraDB RDS instance list, select a region at the top of the page, and then click the ID of the target instance.
-
In the Configuration Information section, click Change Configurations.
-
(This step applies only to subscription instances.) In the dialog box that appears, click Downgrade, and then click Next.
-
Configure the key parameters for the scale-in operation.
Parameter
Description
Storage Type
Optional. Select a storage type as needed.
Instance type
Optional. Select an instance type as needed.
Storage capacity
Drag the slider or click the minus icon to decrease the storage capacity.
NoteAfter a scale-in, the new storage capacity must be greater than or equal to the value from the formula
min{Used storage × 1.3, Used storage + 400 GB}and cannot be less than the minimum allowed for the current instance type. The storage capacity can be adjusted in 5 GB increments.Switching Time
Select a switchover time as needed:
-
Switch Immediately After Data Migration: Data migration starts immediately without affecting your instance. A switchover, which causes a transient connection interruption, occurs upon completion.
-
Switch Within Maintenance Window: Data migration starts immediately without affecting your instance. The switchover, which causes a transient connection interruption, occurs during the specified maintenance window.
-
-
Read and accept the terms of service, and click Pay Now. In the dialog box that appears, confirm the instance information before and after the change, and then click Continue to complete the payment.
Serverless
-
Go to the ApsaraDB RDS instance list, select a region at the top of the page, and then click the ID of the target instance.
-
On the Basic Information page of the instance, in the Instance Resources section, click Modify to the right of Storage Capacity.
-
In the panel that appears, click the minus icon to decrease the storage capacity, and then click OK. In the dialog box that appears, click Confirm.
A scale-in operation requires data copying and takes several minutes, making it longer than a scale-out operation. During a scale-in or scale-out process, the instance state is Changing Configuration. After the process is complete, the instance state changes to Running.
FAQ
-
Q: How long does the transient connection interruption last during a manual storage scale-in for an ApsaraDB RDS for MySQL instance that uses a cloud disk?
A: The operation causes a transient connection interruption that lasts for about 15 seconds. During this period, most operations related to databases, accounts, and networks are unavailable. We recommend performing this operation during off-peak hours and ensuring your application has an automatic reconnection mechanism.
-
Q: How do I scale in the storage capacity of an ApsaraDB RDS for MySQL instance that uses a standard SSD?
A: You cannot scale in the storage capacity of instances that use standard SSDs. In addition, standard SSDs are discontinued. You must upgrade the standard SSD to an ESSD and then follow the instructions in this topic to scale in the storage capacity.
Related documents
-
You can call the ModifyDBInstanceSpec operation to scale in the storage capacity of a cloud disk. Set the DBInstanceStorage parameter to the target storage capacity and configure other parameters as needed.
-
To scale in an instance that uses high-performance local disks, see Change instance configurations.