Switch an ApsaraDB RDS for MySQL instance from serverless to pay-as-you-go when your workloads slightly fluctuate or you need manual control over instance specifications.
To switch from serverless to subscription, first change to pay-as-you-go using this guide, then change from pay-as-you-go to subscription.
When to switch
| Factor | Serverless | Pay-as-you-go |
|---|---|---|
| Workload pattern | Intermittent or unpredictable | Stable or slightly fluctuating |
| Scaling | Automatic (scales with RCUs) | Manual (fixed instance type) |
| Specification control | Automatic | Full manual control |
| Billing granularity | Per RCU consumed | Per hour |
Switch to pay-as-you-go when your workloads are stable enough that automatic scaling no longer saves costs, or when you need to manually select a specific instance type.
For a full overview of serverless use cases, see Overview of serverless ApsaraDB RDS for MySQL instances.
Prerequisites
Before you begin, ensure that your RDS instance meets all of the following requirements:
Runs RDS Basic Edition or RDS High-availability Edition
Uses the serverless billing method
Is in the Running state
Has Secure Sockets Layer (SSL) encryption disabled
Tip: Log in to the ApsaraDB RDS console and check the instance details page to verify these conditions.
Usage notes
Select a target instance type whose CPU core count is greater than or equal to the maximum number of RDS Capacity Units (RCUs) configured for your serverless instance. For example, if your serverless instance allows a maximum of 4 RCUs, choose an instance type with at least 4 CPU cores, such as mysql.n2.large.1 (4 CPU cores, 8 GB memory).
Limitations
You can switch between pay-as-you-go and serverless at most once every 24 hours.
Potential impacts
An instance switchover occurs during the billing method change. Configure your application to automatically reconnect to the RDS instance before you proceed.
For details on what happens during a switchover, see Impacts of an instance switchover.
Billing
The billing method change itself is free. After the change, the instance is billed at the pay-as-you-go rate.
For pay-as-you-go pricing details, see Billing overview.
Change the billing method
Log in to the ApsaraDB RDS console. In the top navigation bar, select the region where your RDS instance resides. Find the instance and click its ID.
On the Basic Information page, go to the Configuration Information section and click Change To Pay-As-You-Go.
On the Change from Serverless to Pay-as-you-go page, configure Instance Type and Switching Time.
Click Confirm Order. In the dialog box that appears, review the settings and click OK to complete the payment.
The instance status changes to Upgrading/Downgrading during the change. After the change completes, the status returns to Running.
FAQ
After I change the billing method, why does a new purchase order appear in Expenses And Costs > Orders?Expenses And Costs > Orders
The change works by internally creating a new pay-as-you-go instance. A new purchase order is generated as part of this process. Once the change is complete, your instance automatically becomes pay-as-you-go.
API reference
Use ModifyDBInstanceSpec to change the billing method programmatically.
| Parameter | Required value | Description |
|---|---|---|
PayType | Postpaid | Sets the billing method to pay-as-you-go. The original instance must use the serverless billing method. |
DBInstanceClass | Target instance type | The instance type to switch to. See Instance types for standard primary ApsaraDB RDS for MySQL instances. |
DBInstanceStorage | Same as original | Do not change storage during the billing method switch. Either omit this parameter or set it to the same value as the original instance. |
Other parameters must not be specified or must be configured with the same values as the original instance. You cannot change the values of these parameters.