Auto pause and resume for Supabase
AgenticDB Supabase can automatically scale compute resources to zero during idle periods, reducing database running costs. When a request arrives, the instance resumes automatically to restore service.
Features
|
Feature |
Description |
|
Auto-pause |
Automatically scales down compute resources to zero when there are no requests, retaining only storage. |
|
Auto-resume |
Automatically detects incoming traffic and resumes the instance. The resume latency is approximately one minute. |
|
Connection hold |
Holds connection requests while the instance resumes. No retry is required. |
|
Cost optimization |
While an instance is paused, you are billed only for storage. No compute fees are incurred. |
Use cases
|
Scenario |
Description |
|
Development and testing environments |
Reduces costs by eliminating charges for idle time outside of work hours. |
|
Applications with low traffic |
Examples include internal admin dashboards or scheduled task systems. |
|
Preview or demo environments |
Suited for environments that are used intermittently and do not require continuous operation. |
Billing
The auto pause and resume feature is available only for pay-as-you-go projects. While a project is paused, you are billed only for storage. No compute fees are incurred.
Notes
-
The auto pause and resume feature is available only for pay-as-you-go projects.
-
This feature is in private preview. During the preview, you can enable it in the China (Chengdu) region. To use this feature, submit a ticket to request access.
-
When auto pause and resume is enabled, automatic and manual controls are mutually exclusive:
-
API restriction: After this feature is enabled, you cannot call the
/pauseand/resumeOpenAPI operations. -
Console restriction: The Pause Instance and Resume Instance buttons in the console are disabled (grayed out).
-
-
Default configuration: A project is automatically paused after two consecutive days (48 hours) of inactivity. The timer starts after the last request completes. If a new request arrives during this period, the timer resets. During the private preview, you cannot adjust the idle time threshold in the console or through the OpenAPI. To change the threshold, submit a ticket.
Enable auto pause and resume
Enable when creating an instance
Console
-
Log on to the AnalyticDB for PostgreSQL console. In the left navigation pane, click .
-
Click Create Project and select Create Project (Paid Plan).
-
Configure Supabase:
-
Product Type: Select pay-as-you-go.
-
Auto Pause and Resume: Toggle the switch to On.
For more information about other parameters, see Create a Supabase project.
-
-
Click Create Now.
API
Call the CreateSupabaseProject operation and set the AutoScale parameter to true in the request.
Enable for an existing instance
Console
-
Log on to the AnalyticDB for PostgreSQL console. In the left navigation pane, click .
-
In the Actions column for the target project, click the
icon and select Enable Auto Start/Stop. -
In the Modify Auto-Sleep Mode dialog box, enter the project ID and click OK.
API
Call the ModifySupabaseAutoScalePolicy operation and set the AutoScale parameter to true.
View the instance status
Console
-
Log on to the AnalyticDB for PostgreSQL console. In the left navigation pane, click .
-
In the project list, view the Auto Start/Stop column to see if the feature is enabled for the project, and view the Status column to check the current status:
-
Running: The compute resources are active and serving requests.
-
Paused: The compute resources are scaled down to zero. Only storage is retained.
-
Resuming: A request has been received, and the compute resources are resuming.
-
API
Call the GetSupabaseProject - Retrieve Supabase instance details operation. The following fields indicate the instance status:
|
Parameter |
Value |
Description |
|
Status |
running |
The instance is running and actively serving requests. |
|
stopped |
The instance is paused. Compute resources are scaled to zero and only storage is retained. |
|
|
starting |
The instance is resuming in response to an incoming request. |
|
|
AutoScale |
true |
Auto pause and resume is enabled. |
|
false |
Auto pause and resume is disabled. |
Disable auto pause and resume
You can disable auto pause and resume only when the project status is Running.
Console
-
Log on to the AnalyticDB for PostgreSQL console. In the left navigation pane, click .
-
In the Actions column for the target project, click the
icon and select Disable Auto Sleep. -
In the Modify Auto-Sleep Mode dialog box, enter the project ID and click OK.
API
Call the ModifySupabaseAutoScalePolicy operation and set the AutoScale parameter to false.