All Products
Search
Document Center

ApsaraDB RDS:Configure the automatic start and stop feature

Last Updated:Jan 19, 2024

This topic describes how to configure the automatic start and stop feature for a serverless ApsaraDB RDS for PostgreSQL instance. After the feature is enabled, if no connections are established to your serverless RDS instance, the serverless RDS instance is automatically suspended to reduce costs. If a connection is established to the suspended serverless RDS instance, the serverless RDS instance is automatically resumed at the earliest opportunity to provide services.

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.

References

  • If your serverless RDS instance fails to provide sufficient resources during peak hours or you want to reduce costs during off-peak hours, you can change the scaling range of RCUs for the serverless RDS instance. For more information, see Change the scaling range of RCUs.

  • You can change the scaling policy of your serverless RDS instance to reduce scaling operations. This helps improve the performance and availability of the serverless RDS instance. The default scaling policy of a serverless RDS instance is Do Not Execute Forcefully, and you can use the default scaling policy to avoid potential service interruptions. If a higher level of performance rather than continuous availability is required, you can manually change the scaling policy to Execute Forcefully. For more information, see Change the scaling policy of RCUs.

  • You can call the ModifyDBInstanceSpec operation to enable the automatic start and stop feature for a serverless RDS instance. The following table describes the required parameters.

    Parameter

    Description

    Example

    DBInstanceId

    The ID of the serverless RDS 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 configuration 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