All Products
Search
Document Center

ApsaraDB RDS:Serverless ApsaraDB RDS for MySQL instances

Last Updated:Oct 01, 2025

Free from fixed specifications, serverless ApsaraDB RDS for MySQL (RDS for MySQL) instances offer two key advantages for cost-efficiency and performance: auto scaling and automatic start/stop. In these instances, computing and storage resources scale automatically with your business needs, while idle instances are suspended to halt computing charges. This ensures you only pay for what you use, precisely when you use it.

Feature overview

A serverless RDS for MySQL instance is defined by two core features that deliver its primary benefits: auto scaling and automatic start/stop.

Auto scaling

Auto scaling applies to both computing and storage. Computing resources scale with workload, while storage expands as data grows.

Computing resources

Serverless RDS instances measure computing resources in RDS Capacity Units (RCUs), where one RCU provides approximately 1 vCPU and 2 GB of memory. You can define a scaling range by setting the minimum and maximum RCUs, and the instance's performance scales automatically within that range to match your workload. The advantage of this approach becomes clear with fluctuating workloads:

  • Regular instances (fixed specifications): You face a trade-off between wasted resources during off-peak hours and performance bottlenecks at peak times.

  • Serverless instances (no fixed specifications): The instance's performance dynamically matches the workload. It scales up to ensure business stability during peak demand and scales down to save costs when idle, maximizing resource utilization.

Resource comparison

Storage

  • Automatic expansion: Storage capacity automatically expands when more space is needed, requiring no manual intervention.

  • Manual shrink: To ensure instance stability and data security, automatic storage shrinking is not supported. However, you can manually shrink storage capacity based on your business needs.

Automatic start/stop

You can enable automatic start/stop (disabled by default) for workloads that are not always active, such as in development and testing environments. This feature automatically suspends the instance after a period of inactivity and restarts it upon receiving a connection request, significantly reducing costs. The process is governed by these rules:

  • Automatic suspend: An instance is automatically suspended after 10 minutes of inactivity (no connections).

  • Automatic start: The instance restarts automatically upon any connection request. The startup process takes 6 to 40 seconds, during which the instance is unavailable.

  • Cost savings: While an instance is suspended, you are billed only for storage, not for computing resources.

Use cases

  • Workloads with significant peaks and troughs.

  • Infrequently used databases, such as in development and testing environments.

  • Intermittent or scheduled tasks, like those for online courses or student labs.

  • Unpredictable workloads, common in IoT and edge computing.

Limitations

  • Regions: Serverless RDS for MySQL instances are available only in the following regions: 

    China (Hangzhou), China (Shanghai), China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), China (Hong Kong), Singapore, US (Virginia), US (Silicon Valley), Germany (Frankfurt), UK (London), Thailand (Bangkok), South Korea (Seoul), Philippines (Manila), Japan (Tokyo), Malaysia (Kuala Lumpur), Indonesia (Jakarta)

  • Editions: Only Basic Edition and High-availability Edition are supported.

  • Storage type: Only PL1 ESSD is supported.

  • RCU range: 0.5 RCU (min) to 32 RCU (max), with a scaling step of 0.5 RCU.

  • Storage capacity: 20 GB (min) to 32 TB (max).

  • Storage shrink: Shrinking can only be manually performed. The minimum capacity after a shrink is min{Current data volume * 1.3, Current data volume + 400 GB}. The new capacity cannot be less than the minimum capacity defined in the instance type.

  • Instance start/stop: When automatic start/stop is enabled, the instance can be automatically suspended, and can be automatically or manually started. Manual suspension is not supported.

Billing

Serverless instances are billed on an hourly basis. Visit the Expenses and Costs page to view your billing details.

Cost breakdown

The total cost of a serverless instance is calculated as follows:

Total cost = Cost per node × Number of nodes

  • Number of nodes: A Basic Edition instance has one node. A High-availability Edition instance has two.

  • Cost per node: This includes the costs for both computing and storage resources.

    Computing resource cost

    The cost for computing resources is billed hourly and calculated as follows:

    Hourly computing resource cost = RCU unit price × Hourly RCU usage

    • Hourly RCU usage: This is the average number of RCUs used per second over the course of an hour.

    • RCU price: The unit price for RCUs varies by region. For example, in the Singapore region, the price is USD 0.07455 per RCU-hour. For prices in other regions, refer to the RDS buy page.

    Storage cost

    The cost for storage is billed hourly based on the following formula:

    Hourly storage cost = Storage price × Storage capacity (GB)

    • Storage capacity (GB): Find the current storage capacity of your instance on the Instance Details page by accessing Basic Information > Instance Resources > Storage Capacity.

    • Storage price: The unit price for storage varies by region. For example, in the Singapore region, the price is USD 0.0004 per GB-hour. For prices in other regions, refer to the RDS buy page.

How instance states affect billing

When automatic start/stop is enabled, the instance state changes as it suspends and restarts, directly impacting your costs. The lifecycle of an instance, its corresponding states, and their billing implications are as follows:

  1. Initial state: The instance is active and fully operational.

    • State: Running

  2. Trigger for suspension: After 10 minutes of inactivity (no connections), the instance begins to suspend.

    • State: Suspending

  3. Suspended state: The instance is fully suspended and idle.

    • State: Suspended

  4. Trigger for start: Upon receiving a new connection request, the instance begins to restart.

    • State: Starting

  5. Return to initial state: The instance becomes fully operational again.

    • State: Running

Instance state

Computing resources (RCUs)

Storage

Suspending

Billed

Billed

Suspended

Not billed

Billed

Starting

Not billed

Billed

Running

Billed

Billed

Billing example

Consider the following scenario for a 24-hour period:

  • Instance: Serverless RDS instance on Basic Edition

  • Region: Singapore

  • Storage capacity: 20 GB

  • Usage pattern:

    • 1 hour at peak usage (8 RCUs)

    • 23 hours at base usage (1 RCU)

Based on the prices for the Singapore region:

  • RCU price: USD 0.07455 per RCU-hour

  • Storage price: USD 0.0004 per GB-hour

The total cost for the day is calculated as follows:

  • RCU cost: (0.07455 × 8 RCUs × 1 hour) + (0.07455 × 1 RCU × 23 hours) = USD 2.31105

  • Storage cost: 0.0004 × 20 GB × 24 hours = USD 0.192

  • Total daily cost: USD 2.31105 (RCU) + USD 0.192 (Storage) = USD 2.50305

Create a serverless instance

You can get a serverless instance in two ways: convert an existing pay-as-you-go instance, or create a new one. This section guides you how to create a new serverless instance.

  1. Navigate to the RDS buy page and set Billing Method to Serverless.

  2. Configure basic instance information.

    1. Region: Select a region for the instance.

      Important

      The region cannot be changed after the instance is created.

      • For internal access from an ECS instance, select the same region as the ECS instance to ensure low-latency communication.

      • For external access, select a region geographically close to your users to reduce network latency

    2. Database Engine: Select MySQL 5.7 or MySQL 8.0.

  3. Configure instance architecture and storage.

    1. Edition: Select the deployment mode of the instance.

      • Basic Edition: A single-node deployment suitable for development, testing, or scenarios with low availability requirements.

      • High-availability Edition: A primary/secondary dual-node deployment with automatic failover, suitable for production environments.

    2. Storage Type: Select PL1 ESSD.

  4. Configure auto scaling.

    1. RDS Capacity Units (RCUs): Configure the minimum and maximum RCUs. The instance scales automatically within this range.

    2. Scaling Policy: In rare cases where scaling cannot be smoothly performed, this policy determines the instance's behavior:

      • Execute Forcefully: Prioritizes performance by forcing the RCU scaling. This may cause a service switchover, so ensure your application can automatically reconnect to the instance.

      • Do Not Execute Forcefully: Prioritizes stability by deferring the scaling operation to maintain existing connections.

    3. Automatic Stop and Restart: Enable this to allow the instance to automatically suspend when idle and restart on request. During suspension, you are only billed for storage.

  5. Configure network and zone.

    1. VPC: For internal communication, select the same VPC as your ECS instance.

    2. Add to Whitelist: Enable this to allow all ECS instances within the same VPC to access the RDS instance directly.

    3. Zone and Network of Primary Node: Select a primary zone. If you select High-availability Edition for Edition, you must also configure a secondary zone based on the value you select for Deployment Method.

  6. Configure the storage capacity. The minimum adjustment step is 5 GB.

  7. (Optional) Configure other parameters. Keep the default values if you have no special requirements.

    Click to expand more parameters

    Parameter

    Description

    Parameter Template

    Select a high-performance, asynchronous, or default parameter template. The parameters in the template are displayed on the right. For more information, see Use a parameter template.

    Time Zone

    Set the instance time zone according to your business needs.

    Table Name Case Sensitivity

    The default is Case-insensitive. If your local database is case-sensitive, change this to Case-sensitive to facilitate data migration.

    Release Protection

    When enabled, this feature prevents the instance from being accidentally deleted. For more information, see Enable or disable the release protection feature.

    Resource Group

    Select a default or custom resource group to facilitate instance management.

    Instance Name

    Enter a name for the instance for identification, .

    Tags

    Add tags to the instance for classification and management. For more information, see Use tags to filter ApsaraDB RDS for MySQL instances.

    Privileged Account

    Select how to create a privileged account for the instance. Valid values:

    • Configure Now: Enter the account name and password, and then confirm the password. The account is created during instance creation.

    • Configure Later: The privileged account is not created during instance creation. You can manually create it after the instance is created.

  8. Confirm the configuration and place the order.

    To create multiple instances with the same configuration, configure Quantity in the upper-right corner (up to 20). Review your configuration and click Confirm Order.

  9. View your instance.

    After successful payment, navigate to the Instances page and select the region of your instance. The instance will appear with a Creating state, which takes about 10 minutes. The instance is ready when its status changes to Running.

    Note

    There might be a short delay between payment and the instance appearing in the console. If it doesn't appear immediately, wait a few moments and refresh the page.

View RCU usage and storage capacity changes

You can view the changes in RCU usage and storage capacity over the past 30 days to determine if your auto scaling configuration needs adjustment.

  1. Navigate to the Instances page, select the region of your instance from the top menu, and then click the ID of the instance.

  2. In the left-side navigation pane, click Monitoring and Alerts.

  3. On the Standard Monitoring tab, click Old Version in the upper-right corner.

  4. On the Resource Monitoring tab, view the historical data for Database Capacity (RCUs) and Disk Space.

Adjust auto scaling settings

Adjust RCU range and scaling policy

  1. Navigate to the Instances page, select the region of your instance from the top menu, and then click the instance ID.

  2. In the Configuration Information section, click Adjust Elastic Settings.

  3. In the panel that appears, modify the auto scaling settings:

    1. RDS Capacity Units (RCUs): Adjust the minimum and maximum RCU values to better fit your workload.

    2. Scaling Policy: Choose the instance's behavior for rare cases where scaling cannot be smoothly performed:

      • Execute Forcefully: Prioritizes performance by forcing the RCU scaling. This may cause a service switchover, so ensure your application can automatically reconnect to the instance.

      • Do Not Execute Forcefully: Prioritizes stability by deferring the scaling operation to maintain existing connections.

  4. Click OK.

Manually adjust storage capacity

A serverless instance automatically expands its storage capacity when the available storage space is low. However, to ensure stability and data security, the instance does not automatically shrink its storage capacity. You can manually adjust the storage capacity by following these steps:

  1. Navigate to the Instances page, select the region of your instance from the top menu, and then click the instance ID.

  2. On the Basic Information page, in the Instance Resources section, click Modify next to Storage Capacity.

  3. In the panel that appears, increase or decrease the storage capacity, click OK. Then, click Confirm in the dialog box that appears.

Note

Shrinking the storage capacity takes longer than expansion because it requires data replication. During this process, the instance state will be Upgrading/Downgrading. After the operation is complete, the state will return to Running.

Manage instance start/stop

Enable or disable automatic start/stop

  1. Navigate to the Instances page, select the region of your instance from the top menu, and then click the instance ID.

  2. In the Configuration Information section, click Modify Scaling Settings.

  3. Click Advanced Settings, select Enable or Disable from the Automatic Stop and Restart drop-down list, and click OK at the bottom of the page.

Note

he instance takes approximately 6 to 40 seconds to restart from a suspended state. During this time (the Starting state), the instance is unavailable.

Manually start an instance

  • From the Instances page:

    1. Navigate to the Instances page, select the region of your instance from the top menu. 

    2. In the Actions column for the instance, click More and then click Start Instance.

  • From the instance details page:

    1. Navigate to the Instances page, select the region of your instance from the top menu, and then click the instance ID. 

    2. On the Basic Information page, in the Status section, click Start Instance.

View instance start/stop records

  1. Navigate to the RDS console, click Task Center in the left-side navigation pane.

  2. View the start/stop records (both automatic and manual) for the instance.

Upgrade an instance from Basic Edition to High-availability Edition

For better disaster recovery capabilities or advanced features, upgrade the edition of a serverless instance from Basic Edition to High-availability Edition.

  1. Navigate to the Instances page, select the region of your instance from the top menu, and then click the instance ID.

  2. In the Configuration Information section, click Modify Elastic Settings.

  3. In the panel that appears, select High-availability Edition for Edition, and click OK.

  4. In the dialog box that appears, check the information before and after the upgrade, and then click Confirm. During the upgrade, the instance status is Upgrading/Downgrading. After the upgrade is complete, the instance status changes to Running.

Schedule RCU configurations

The auto scaling of RCUs typically completes within seconds. However, it can take 3 to 5 minutes in rare cases that require cross-host scaling. If your application has strict stability requirements during specific periods, such as for anticipated traffic spikes, you can guarantee performance by scheduling an RCU increase in advance. For detailed instructions, see Configure scheduled tasks to adjust the number of RCUs for a serverless RDS instance.

FAQ

  • Q1: Why didn't my serverless instance suspend automatically? How do I check its current connections?

    There are several common reasons for this. Please check the following in order:

    1. Confirm the feature is enabled: The automatic start/stop feature is disabled by default. Ensure you have manually enabled it.

    2. Check for active connections: The instance will only suspend if it has zero active connections. You can check connections in two ways:

      • To view the connection count: On the instance's Basic Information page, click Monitoring and Alerts in the left-side navigation pane. Then, check the Session metric on the Standard Monitoring tab.

      • To view connection details: Run the SHOW PROCESSLIST command.

    3. Review your whitelist settings: If your instance has a public endpoint and a whitelist open to all IP addresses, it may be receiving persistent external scans. This activity prevents the instance from suspending. Consider releasing the public endpoint or restricting the whitelist to trusted IP addresses only.

  • Q2: How long does RCU scaling take? What are the trigger conditions for RCU auto scaling?

    • Duration: RCU scaling is typically completed in real time (within seconds). In rare cases that require cross-host migration, it may take 3 to 5 minutes. Instances of the High-availability Edition are less likely to experience this delay due to their secondary node.

    • Trigger conditions:

      • Scale-up: Triggered when either CPU utilization or memory usage rises to its upper threshold.

      • Scale-down: Triggered when both CPU utilization and memory usage fall below their lower thresholds.

      • The thresholds typically range between 40% and 80% and may be adjusted by the system to ensure availability.

  • Q3: How do I choose the RCU scaling range?

    You can use one of the following methods:

    • Perform a stress test to determine the number of RCUs or CPU cores required for your lowest and highest workloads.

    • Estimate the range based on the number of CPU cores required by your business. 1 RCU is approximately equal to 1 vCPU and 2 GB of memory.

  • Q4: Will I be charged if I'm not using my serverless instance?

    This depends on whether automatic start/stop is enabled.

    • Enabled: If the instance has no connections for 10 minutes, it automatically suspends. In this state, you are billed only for storage.

    • Disabled: The instance remains in the Running state regardless of usage. You are billed for both storage and computing resources. When idle, computing resources are typically billed based on your minimum RCU settings.

  • Q5: Is a High-availability Edition instance deployed in a single zone or multiple zones?

    A High-availability Edition instance can be deployed in either a single zone or across multiple zones, based on the configuration you choose during creation.