All Products
Search
Document Center

ApsaraDB RDS:Configure the automatic start and stop feature

Last Updated:Jul 18, 2023

This topic describes how to configure the automatic start and stop feature for a serverless ApsaraDB RDS for PostgreSQL instance. This feature helps you reduce costs.

Background information

ApsaraDB RDS for PostgreSQL supports the automatic start and stop feature for serverless RDS instances to reduce costs. If no connections to the serverless RDS instance are established within 10 minutes, the serverless RDS instance is automatically suspended. In this case, no RDS Capacity Units (RCUs) are consumed, and no computing fees are generated. If a connection is established to the serverless RDS instance, the serverless RDS instance automatically resumes, and computing fees are generated.

Usage notes

The operations in this topic apply only to serverless RDS instances. Make sure that the billing method of your RDS instance is serverless.

Impacts

A suspended serverless RDS instance automatically resumes when a connection is established to the serverless RDS instance. This process may cause an access latency within minutes.

Billing rules

Important

The fees of a serverless RDS instance consists of computing fees and storage fees. The automatic start and stop feature only affects the computing fees.

You are not charged for the computing fees when your serverless RDS instance is suspended. After the serverless RDS instance resumes, computing fees are generated. The fee for RCUs varies only based on the actual usage of RCUs. For more information, see Overview of serverless ApsaraDB RDS for PostgreSQL instances.

The following table describes the billing rules for a serverless RDS instance in different states:

Instance state

Computing resource fee

Storage capacity fee

Suspending

Charged

Charged

Suspended

Free of charge

Charged

Starting

Free of charge

Charged

Running

Charged

Charged

Procedure

Enable the automatic start and stop feature

  • If you do not have a serverless RDS instance, you can enable the automatic start and stop feature when you create a serverless RDS instance. For more information, see Create a serverless ApsaraDB RDS for PostgreSQL instance.

  • If you have a serverless RDS instance but the automatic start and stop feature is disabled for the serverless RDS instance, you can perform the following steps to enable the feature:

    1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
    2. In the Configuration Information section, click Modify Scaling Settings.

    3. Click Advanced Settings, select Enable from the Automatic Stop and Restart drop-down list, and then click OK in the lower part of the page.

Note

If you want to forcefully start a suspended RDS instance, you can disable the automatic start and stop feature for the instance. For more information, see Configure the automatic start and stop feature for a serverless ApsaraDB RDS for PostgreSQL instance.

Disable the automatic start and stop feature

  1. Go to the Instances page. In the top navigation bar, select the region in which the RDS instance resides. Then, find the RDS instance and click the ID of the instance.
  2. In the Configuration Information section, click Modify Scaling Settings.

  3. Click Advanced Settings, select Disable from the Automatic Stop and Restart drop-down list, and then click OK in the lower part of the page.

Related operations

You can call the ModifyDBInstanceSpec operation to enable the automatic start and stop feature for an serverless ApsaraDB RDS for PostgreSQL instance. The following table describes the parameters.

Parameter

Description

Example

DBInstanceId

The ID of the serverless instance for which you want to enable the automatic start and stop feature.

pgm-****

PayType

The billing method of the serverless instance. Set the value to Serverless.

Serverless

Direction

The specification change type of the instance. Set the value to Serverless.

Serverless

ServerlessConfiguration.AutoPause

Specifies whether to enable the automatic start and stop feature.

  • true: enables the feature.

  • false: disables the feature. This is the default value.

true