Traditional warehouses often use the resource pre-purchase method, which lacks business-oriented resource adjustment flexibility. Instances cannot be used on demand in data analysis scenarios where there are obvious business peaks and troughs or time-sharing requests, resulting in a large amount of cost waste.
Cloud-native data warehouse AnalyticDB for PostgreSQL was released Serverless in February 2022. Since then, based on the powerful resource management capabilities of the kernel and the cloud-native-oriented control system, Serverless instance computing pause has been released, and it implemented the transformation of per-second billing and free computing resources during the pause. This capability helps customers save costs during the computing idle period. The effect is clear in the following scenarios:
Product Documentation: https://www.alibabacloud.com/help/en/analyticdb-for-postgresql/latest/manual-start-stop
Users can pause or start an instance using the console or OpenAPI. During the instance pause, we will pause the computing resources of the user instance and no longer charge for computing. At the same time, this pause will not affect the data storage and network linking string of the instance. The instance can be used without any changes after startup.
We provide complete notification, alerting, and auditing processes for users for pausing and starting events. Users can view manual start and pause, planned start and pause, and scale in and out operations in the Event Center of the console for event-side display. At the same time, users can configure CloudMonitor alerts based on these events to track the start and pause effects timely.
When an instance is paused, only storage fees are charged, without charging computing resources. We have transformed the underlying billing service to ensure accurate usage statistics, which perceives events of instance start and pause in real-time, calculates the actual usage duration in the second level, and bills the instance by the hour.
Users can trigger instance start and pause using the console or OpenAPI. The service controller manages the lifecycle of various resources and drives per-second metering and billing and event alerts by events.
The instance runs on Kubernetes, involving graceful Pod pause and creation, scheduling, and Pod information reconstruction:
In native Kubernetes, the lifecycle of network resources is the same as that of Pod. Most communities use IPPool to implement IP hold in scenarios where stateful services are strongly dependent on IP. We adopt a similar one-to-one correspondence between ENI and Pod to separately manage ENI retention and reuse to ensure:
It includes user data, cache data, and backup data. If user data is stored in a cloud disk or OSS, we will retain it for reuse. The cache can be released to reduce resource waste. For backup data, we change the policy of regular cleaning (typically seven days) to retain the last backup set. As such, when the instance is restarted, the backup data before the pause can be used to ensure data reliability.
We can see that more controllers in the cloud-native ecosystem are implemented based on event-driven. We adopt a similar solution, using Alibaba SLS as the CloudEvent channel to achieve.
After purchasing a Serverless instance, users can perform the following operations to pause and start the instance. The corresponding computing resource usage bill can be seen in the Billing section.
Note: Currently, Serverless only supports pause in the pay-as-you-go method. Pause does not work well in the subscription method due to the pre-purchase of resources.
Click the link to purchase a Serverless instance: Pay-As-You-Go Trial
Log on to the AnalyticDB for PostgreSQL console. On the Instance Lists page, find the instance to be paused and click Pause Instance in the More Operations column.
Alternatively, on the Instance Details page, run Instance Management → Pause Instance.
When the task is issued, the instance will switch to the pause state. After about two minutes, the instance turns to the paused state.
On the Instance Details page, run Instance Management → Start Instance:
All the start and pause events in the Notification Event category can be viewed in the Event Center of the AnalyticDB for PostgreSQL console.
Users can jump to the CloudMonitor page through the "Configuration Alert" link. We help users automatically fill in the default parameters. They can configure alert information (such as phone calls, SMS messages, emails, and webhook).
In addition to using the console, we provide OpenAPI to start and pause.
Pause an instance:
http(s)://gpdb.aliyuncs.com/?Action=PauseInstance
&DBInstanceId=gp-bp***************
&Common request parameters
Start an instance:
http(s)://gpdb.aliyuncs.com/?Action=ResumeInstance
&DBInstanceId=gp-bp***************
&Common request parameters
Java SDK:
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>gpdb20160503</artifactId>
<version>1.0.25</version>
</dependency>
Reducing costs and increasing efficiency has always been the common goal between users and us. With the help of cloud technology and exclusive product kernels, we can provide cost-effective products, so instances can be used on-demand and pay-as-you-go. We also attach importance to the user experience and strive to do a better job in terms of convenience and functions. The time of pausing and starting an instance can be compressed into a few minutes, which realizes the on-demand pause and start without any burdens. The technical dividend on the cloud can help enterprises increase efficiency and reduce costs.
[Best Practice] Instance Plan Management Released by AnalyticDB for PostgreSQL
ApsaraDB - February 13, 2023
ApsaraDB - December 19, 2022
ApsaraDB - October 29, 2024
ApsaraDB - July 19, 2023
OpenAnolis - April 20, 2022
ApsaraDB - January 22, 2021
Alibaba Cloud PolarDB for PostgreSQL is an in-house relational database service 100% compatible with PostgreSQL and highly compatible with the Oracle syntax.
Learn MoreA real-time data warehouse for serving and analytics which is compatible with PostgreSQL.
Learn MoreLeverage cloud-native database solutions dedicated for FinTech.
Learn MoreLindorm is an elastic cloud-native database service that supports multiple data models. It is capable of processing various types of data and is compatible with multiple database engine, such as Apache HBase®, Apache Cassandra®, and OpenTSDB.
Learn MoreMore Posts by ApsaraDB