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.
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.
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
How to use
Change the resource scaling range (RCU)
Adjust the minimum and maximum RCU to optimize resource configuration for your workload.
Schedule the RCUs for a Serverless instance
Pre-configure RCU values for specific periods using scheduled tasks to ensure instance stability.
Change an instance elastic policy
Choose the default non-enforced policy to prevent service interruptions, or the enforced policy when performance takes priority over continuous availability.
Configure automatic start and stop for an instance
When enabled, the instance pauses after 10 minutes with no active connections. In the paused state, RCU is 0 and no compute charges apply. The instance resumes automatically when a new connection is made.
Free trial
If you are eligible for a free trial, you can try an ApsaraDB RDS for PostgreSQL Serverless instance for free.
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 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:
The RCU limit is reached: The instance has reached its maximum RCU value. Evaluate your peak requirements and increase the maximum RCU limit.
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.