Serverless instances

更新时间:
复制 MD 格式

ApsaraDB RDS for PostgreSQL Serverless instances provide real-time elastic scaling of CPU and memory. Database resources adapt automatically to workload changes, preventing resource waste and reducing O&M costs.

Introduction

ApsaraDB RDS for PostgreSQL Serverless instances run on a cloud disk architecture with real-time elastic scaling of CPU and memory. They provide vertical resource isolation for network, namespaces, and storage, with pay-as-you-go billing for compute resources. Compute resources scale automatically based on traffic, helping you optimize costs and respond to workload changes.

Note
  • Compute resources are measured in RDS Capacity Units (RCUs). One RCU equals approximately 1 vCPU and 2 GB of memory. Resources scale automatically within your specified RCU range.

  • The maximum number of connections is fixed at 2,400 regardless of the RCU value.

The following figure compares resource usage between regular and Serverless instances under fluctuating workloads.image

With fluctuating workloads:

  • Regular instances: Waste resources during off-peak periods and lack capacity during peaks, which can impact your business.

  • Serverless instances:

    • Compute resources adjust to demand, reducing waste and lowering costs.

    • Meet peak demand, ensuring business continuity and stability.

    • Pay-as-you-go billing with dynamic resource matching saves costs compared to fixed-resource subscriptions.

    • Eliminate manual scaling, reducing O&M costs for operations staff and developers.

    • Support automatic start and stop. The instance pauses when there are no active connections, releasing compute resources and saving costs, and resumes when a new connection is established.

    • Optimized for high-throughput writes and high-concurrency workloads with elastic scaling for traffic peaks and troughs.

Advantages

  • Lower costs: For startups, ready to use with no infrastructure dependencies. Provides stable, efficient data access with pay-per-use billing.

  • Larger storage space: Storage scales up to 32 TB and expands automatically based on data volume, preventing interruptions from insufficient storage.

  • Automatic elastic scaling of compute resources: Compute resources scale elastically for read and write operations, reducing O&M costs.

  • Fully managed: Alibaba Cloud handles all O&M tasks, including deployment, scaling, and alerts, transparently without affecting your business.

Scenarios

  • Development and staging environments with low-frequency database usage.

  • SaaS applications, such as website building for small and medium-sized enterprises.

  • Individual developers.

  • Education, such as teaching and student experiments.

  • Unpredictable workloads, such as IoT and edge computing.

  • Users who want a fully managed service.

  • Users with fluctuating or unpredictable workloads.

  • Intermittent scheduled tasks.

Billing description

Serverless pricing

How to use

Free trial

If you are eligible for a free trial, you can try an ApsaraDB RDS for PostgreSQL Serverless instance for free.

Important

The free trial period cannot be extended. After the trial expires, the instance continues to run and incurs charges. If you no longer need the instance, shut it down and release it promptly. Released instances cannot be recovered — back up your data in advance. On the Expenses and Costs page, click My Trials. On the My Trials page, check Trial Status and Trial Progress. Free Trial FAQ.

FAQ

Q: Why do I receive Cloud Monitor alerts for CPU, memory, and other metrics for my Serverless instance?

A: This happens when pre-configured global alert rules exist. If CPU or memory alert rules apply to all ApsaraDB RDS for PostgreSQL instances or a resource group, new Serverless instances inherit them automatically. Alerts still trigger when usage reaches the threshold, even though Serverless instances auto-scale.

To manage alerts, log on to the Cloud Monitor console. Go to Alert Service > Alert Rules and use the advanced filter to manage alert rules for the Serverless instance.

Q: Why did my instance fail to scale out (increase the RCU) in a timely manner during high load, causing the service to become unresponsive?

A: Two common causes:

  1. The RCU limit is reached: The instance has reached its maximum RCU value. Evaluate your peak requirements and increase the maximum RCU limit.

  2. Scaling latency cannot match instantaneous traffic: Scaling has a response latency. It triggers when CPU or memory usage exceeds 80% and takes about 5 seconds. If traffic surges within less than 5 seconds, the instance may become unresponsive before scaling completes. For instantaneous ultra-high concurrency, use regular instances with provisioned resources.

Q: Why does my instance not automatically scale in (decrease the RCU) after the business load decreases?

A: A Serverless instance scales in only when both CPU usage is below 50% and memory usage is below 50%.

A common reason is PostgreSQL's page cache. Even after load decreases, PostgreSQL keeps data in memory to optimize subsequent queries, preventing memory usage from dropping below 50%. To trigger an immediate scale-in, restart the instance to release the page cache.

Q: How can I start an instance that is paused and has no connections?

A: Disable the automatic start and stop feature in the console. The instance starts automatically.