Serverless computing package

更新时间:
复制 MD 格式

PolarDB provides a serverless compute package that offsets the cost of dynamic resources used by compute nodes for serverless clusters and the serverless feature of fixed-spec clusters, reducing your costs.

Notes

Pricing

Serverless compute packages are priced uniformly at CNY 0.38 per PCU per hour in all regions, including the Chinese mainland, China (Hong Kong), and overseas regions. This is 95% of the standard serverless rate in the Chinese mainland. Deduction factors vary by region. See the deduction table below for details.

Compute package capacity

  • 30 to 5,000 PCU-hours

  • 5,000 to 100,000 PCU-hours

  • 100,000 to 1,000,000 PCU-hours

Deduction rules

  • PCU usage for all nodes in a cluster is deducted hourly.

  • For each node, the amount deducted (CU*H) per interval is calculated using the following formula: PCU count * (deduction factor * time factor). The time factor is the duration in seconds divided by 3600.

Note
  • Within an hour, a deduction is made from the Serverless compute package each time the PCU count of a node changes. If the PCU count of the node does not change within the hour, one deduction is made from the Serverless compute package based on the node's current PCU count.

  • For each node, the sum of its time factors over a one-hour period is 1. This ensures that the total hourly deduction is calculated using the full regional deduction factor.

image

Example 1: PCU count remains unchanged within one hour

Consider a cluster in the Chinese mainland, where the regional deduction factor is 1. The Serverless configuration is set with a minimum resources per node of 1 PCU and a minimum number of read-only nodes of 1. If the cluster has no active connections during a one-hour period, it will have one primary node (1 PCU) and one read-only node (1 PCU). According to the deduction rules, the total deducted usage for the cluster in that hour is calculated as follows: the primary node usage (1 (PCU count) * 1 (deduction factor) * 1 (time factor)) plus the read-only node usage (1 (PCU count) * 1 (deduction factor) * 1 (time factor)), totaling 2 CU*H.

Example 2: PCU count changes within one hour

Consider a cluster in China (Hong Kong), where the regional deduction factor is 1.9. The Serverless configuration is set with a minimum resources per node of 1 PCU, a maximum resources per node of 16 PCU, a minimum number of read-only nodes of 1, and a maximum number of read-only nodes of 4. If the cluster workload increases during an hour, the PCU count for its nodes changes as follows:

Node

PCU count

Duration (seconds)

Deduction (CU*H)

primary node

1

2700

1.425 = 1 (PCU count) * 1.9 (deduction factor) * 2700 / 3600 (time factor)

1.5

90

0.07125 = 1.5 (PCU count) * 1.9 (deduction factor) * 90 / 3600 (time factor)

2

90

0.095 = 2 (PCU count) * 1.9 (deduction factor) * 90 / 3600 (time factor)

2.5

90

0.11875 = 2.5 (PCU count) * 1.9 (deduction factor) * 90 / 3600 (time factor)

3

90

0.1425 = 3 (PCU count) * 1.9 (deduction factor) * 90 / 3600 (time factor)

3.5

540

0.9975 = 3.5 (PCU count) * 1.9 (deduction factor) * 540 / 3600 (time factor)

read-only node (no horizontal scaling)

1

2700

1.425 = 1 (PCU count) * 1.9 (deduction factor) * 2700 / 3600 (time factor)

1.5

180

0.1425 = 1.5 (PCU count) * 1.9 (deduction factor) * 180 / 3600 (time factor)

2

180

0.19 = 2 (PCU count) * 1.9 (deduction factor) * 180 / 3600 (time factor)

2.5

540

0.7125 = 2.5 (PCU count) * 1.9 (deduction factor) * 540 / 3600 (time factor)

Based on the table, the cluster's total deducted usage for this hour is the sum of the primary node's usage (1.425 + 0.07125 + 0.095 + 0.11875 + 0.1425 + 0.9975) and the read-only node's usage (1.425 + 0.1425 + 0.19 + 0.7125), totaling 5.32 CU*H.

Deduction table

Deduction factors by region

Region

Product version

Deduction factor

Deductible capacity

Chinese mainland

Enterprise

1

50 CU*H / 1 = 50 CU*H

Standard

0.875

50 CU*H / 0.875 = 57.14 CU*H

US (Virginia)

Enterprise

1.3

50 CU*H / 1.3 = 38.46 CU*H

Standard

1.1375

50 CU*H / 1.1375 = 43.96 CU*H

US (Silicon Valley)

Enterprise

1.55

50 CU*H / 1.55 = 32.26 CU*H

Standard

-

-

Japan (Tokyo)

Enterprise

1.6

50 CU*H / 1.6 = 31.25 CU*H

Standard

1.4

50 CU*H / 1.4 = 35.71 CU*H

Korea (Seoul)

Enterprise

1.6

50 CU*H / 1.6 = 31.25 CU*H

Standard

-

-

Germany (Frankfurt)

Enterprise

1.7

50 CU*H / 1.7 = 29.41 CU*H

Standard

1.4875

50 CU*H / 1.4875 = 33.61 CU*H

Indonesia (Jakarta)

Enterprise

1.75

50 CU*H / 1.75 = 28.57 CU*H

Standard

1.53125

50 CU*H / 1.53125 = 32.65 CU*H

Philippines (Manila)

Enterprise

1.75

50 CU*H / 1.75 = 28.57 CU*H

Standard

-

-

Thailand (Bangkok)

Enterprise

1.75

50 CU*H / 1.75 = 28.57 CU*H

Standard

-

-

Singapore

Enterprise

1.9

50 CU*H / 1.9 = 26.32 CU*H

Standard

1.6625

50 CU*H / 1.6625 = 30.08 CU*H

Malaysia (Kuala Lumpur)

Enterprise

1.9

50 CU*H / 1.9 = 26.32 CU*H

Standard

-

-

China (Hong Kong)

Enterprise

1.9

50 CU*H / 1.9 = 26.32 CU*H

Standard

1.6625

50 CU*H / 1.6625 = 30.08 CU*H

UK (London)

Enterprise

1.9

50 CU*H / 1.9 = 26.32 CU*H

Standard

-

-

Application order

If you purchase multiple Serverless compute packages, the Serverless compute packages are deducted in order of their expiration time from earliest to latest. If the expiration time is the same, the Serverless compute package that was purchased first is deducted first.

Best practice

This example shows how to estimate the required capacity for a serverless computing package.

  • Example PolarDB requirements:

    • Region: A region in the Chinese mainland.

    • Clusters:

      • Clusters A, B, and C: One primary node (2 PCU) and one read-only node (2 PCU).

      • Cluster D: One primary node (4 PCU) and two read-only nodes (4 PCU each).

      • Cluster E: One primary node (2 PCU) and two read-only nodes (4 PCU each).

    Note

    In this example, the cluster workloads are stable, and node PCU counts do not change.

  • Estimated PCU consumption:

    Required capacity = (Total node PCUs) × deduction factor × number of hours

    • Clusters A, B, and C

      4 PCU (2 PCU + 2 PCU) × 1 (deduction factor) × 24 (hours) × 3 (clusters) = 288 PCU.

    • Cluster D

      12 PCU (4 PCU + 8 PCU) × 1 (deduction factor) × 24 (hours) = 288 PCU.

    • Cluster E

      10 PCU (2 PCU + 8 PCU) × 1 (deduction factor) × 24 (hours) = 240 PCU.

    In this example, the estimated daily consumption is 816 PCU (288 PCU + 288 PCU + 240 PCU), and the estimated monthly consumption is 24,480 PCU (816 PCU × 30). To account for potential workload fluctuations, consider adding a buffer of approximately 5%. Therefore, a serverless computing package with a capacity of 25,704 PCU (24,480 PCU × 1.05) is sufficient for one month.

Related operations

Purchase Serverless Compute Package

Go to the PolarDB purchase page to purchase a serverless computing package. Select the resource package capacity tier and resource package specifications, and then configure the quantity and purchase duration. You can confirm your order in the configuration summary panel on the right.

Note

Purchase duration is the validity period of the serverless computing package. If you select one year, the serverless computing package is valid for one year, after which any remaining capacity expires.

View Serverless compute package usage

Go to PolarDB console > Resource Package, and on the Serverless Compute Package tab, view your purchased Serverless compute packages and the Remaining Amount/Total Amount for each compute package.

Click Usage Details. You are redirected to the Cost Management > Account > Resource Package page to view the usage details of the current Serverless compute package.

Note
  • A serverless computing package covers the hourly PCU usage of all nodes in a cluster. For more information about the deduction rules, see deduction rules.

  • A serverless computing package takes effect immediately after purchase. However, deduction information may take up to six hours to appear. We recommend checking again later.

Unsubscribe from Serverless Compute Package

  1. You can go to the PolarDB console > Resource Packages page. On the Serverless Compute Package tab, find the target Serverless compute package, and click Unsubscribe in the Actions column.

  2. After you click Unsubscribe, you are redirected to the Cost Management > Subscription Orders > Resource Unsubscription page. Under the Unsubscribe Resources and Resource Packages options, find the target Serverless compute package and click Unsubscribe Resource.

Note
  • You cannot unsubscribe from a serverless computing package if it has expired or its capacity has been exhausted.

  • For details on the refund process, see Refund Policy.

FAQ

Purchase and use

Covered fees

A Serverless Compute Package offsets the dynamic resource fees for compute nodes in serverless clusters and the Serverless feature of fixed-specification clusters.

Package usage

Note

If you have not purchased a serverless cluster or enabled the Serverless feature on your existing clusters, you can start using a Serverless Compute Package in two steps:

  1. Purchase a Serverless Compute Package.

  2. Create a serverless cluster or enable the Serverless feature for a fixed-specification cluster.

Required purchase

No. You can decide whether to purchase a Serverless Compute Package based on your needs. If you purchase one, it automatically offsets the compute resource fees of your serverless cluster.

Coupon usage

You can check the scope of your coupon to determine whether it applies to a Serverless Compute Package. If you confirm that the scope of your coupon includes the Serverless Compute Package, but you cannot apply it to the payment when you purchase a Serverless Compute Package, please contact us.

Total fee coverage

No. For a serverless cluster, a Serverless Compute Package only offsets compute node resource fees up to the package's capacity. data storage is billed separately, by default on a Pay-As-You-Go basis. You can also purchase a Storage Package to reduce storage costs.

Supported clusters

Supported clusters

Only Serverless clusters and fixed-specification clusters with the Serverless feature enabled can use the Serverless compute package. Other clusters do not support the Serverless compute package.

Can PolarDB clusters created before purchasing a Serverless compute package also use a Serverless compute package?

Yes.

If the Serverless feature was enabled on a fixed-specification cluster before a Serverless Compute Package was purchased, can the cluster still use a Serverless Compute Package?

Yes.

Sharing across clusters

Yes.

Applying to a specific cluster

Currently, you cannot apply a Serverless Compute Package to a specific cluster.

Covered usage

Pay-as-you-go cluster coverage

No. When you use a PolarDB cluster, you are charged for compute nodes, storage space, backup storage (for usage beyond the free tier), SQL Insight (optional), and cold data archiving (optional).

After you purchase a Serverless compute package, the compute nodes in your Serverless cluster are no longer billed by the hour. Instead, their usage is deducted hourly from the Serverless compute package based on PCU consumption. However, other fees cannot be deducted from the Serverless compute package.

Deduction calculation

  • PCU usage for all nodes in a cluster is deducted hourly.

  • For each node, the amount deducted (CU*H) per interval is calculated using the following formula: PCU count * (deduction factor * time factor). The time factor is the duration in seconds divided by 3600.

Note
  • Within an hour, a deduction is made from the Serverless compute package each time the PCU count of a node changes. If the PCU count of the node does not change within the hour, one deduction is made from the Serverless compute package based on the node's current PCU count.

  • For each node, the sum of its time factors over a one-hour period is 1. This ensures that the total hourly deduction is calculated using the full regional deduction factor.

Package duration estimate

The answer depends on your usage. Let's take a serverless cluster in the Chinese mainland as an example. The cluster has one primary node and two read-only nodes, each configured to scale between 1 and 32 PCUs.

  • Scenario 1: Suppose that from 09:00 to 19:00, the primary node runs at 4 PCUs, and the two read-only nodes each run at 2 PCUs. From 19:00 to 09:00 the next day, the primary node runs at 2 PCUs, and the two read-only nodes each run at 1 PCU.

    The daily usage is calculated as follows:

    • Primary node usage:

      • 09:00 to 19:00 (10 hours): 4 PCUs × 10 hours = 40 PCU-hours.

      • 19:00 to 09:00 (14 hours): 2 PCUs × 14 hours = 28 PCU-hours.

    • Read-only nodes usage (for two nodes):

      • 09:00 to 19:00 (10 hours): 2 PCUs/node × 2 nodes × 10 hours = 40 PCU-hours.

      • 19:00 to 09:00 (14 hours): 1 PCU/node × 2 nodes × 14 hours = 28 PCU-hours.

    The total daily deduction is 40 + 28 + 40 + 28 = 136 PCU-hours. Therefore, a 100,000 PCU-hour package would cover approximately 100,000 / 136 ≈ 735 days of Serverless compute node costs.

  • Scenario 2: Suppose that the primary node runs at 4 PCUs and the two read-only nodes each run at 2 PCUs. However, a 30-minute high-load period occurs from 12:00 to 12:30, during which the primary node scales up to 10 PCUs and each read-only node scales up to 8 PCUs.

    The daily usage is calculated as follows:

    • Primary node usage:

      • 12:00 to 13:00 hour: (10 PCUs × 0.5 hours) + (4 PCUs × 0.5 hours) = 7 PCU-hours.

      • Other 23 hours: 4 PCUs × 23 hours = 92 PCU-hours.

    • Read-only nodes usage (for two nodes):

      • 12:00 to 13:00 hour: [(8 PCUs × 0.5 hours) + (2 PCUs × 0.5 hours)] × 2 nodes = 10 PCU-hours.

      • Other 23 hours: (2 PCUs × 23 hours) × 2 nodes = 92 PCU-hours.

    The total daily deduction is 7 + 92 + 10 + 92 = 201 PCU-hours. Therefore, a 100,000 PCU-hour package would cover approximately 100,000 / 201 ≈ 497 days of Serverless compute node costs.

Multiple package application

PolarDB supports three types of resource packages: Fixed-specification Compute Package, Serverless Compute Package, and Storage Package. You can purchase and stack multiple packages of any type.

  • A Fixed-specification Compute Package covers the costs of fixed-specification resources for compute nodes in Pay-As-You-Go clusters across all regions under your account.

  • A Serverless Compute Package covers the costs of dynamic resources for compute nodes in serverless clusters and for the Serverless feature of fixed-specification clusters across all regions under your account.

  • Storage Packages are available in two types: Chinese Mainland Universal and China (Hong Kong) and International Universal. They are shared by all PolarDB clusters within the regions specified by their type.

If you have multiple resource packages of the same type, they are applied as follows:

  • Packages are prioritized by expiration date; the one expiring soonest is used first. If multiple packages have the same expiration date, the one purchased first is used first.

  • If your usage exceeds the available capacity of all packages of a certain type, the excess usage is automatically billed at Pay-As-You-Go rates.

Upgrades and renewals

Upgrading the package

No. If your Serverless compute package has insufficient capacity, you can purchase another Serverless compute package. If you purchase multiple Serverless compute packages, they are deducted sequentially in the chronological order of the Serverless compute package purchases.

Renewing the package

No. Each Serverless compute package is valid for one, three, or five years. After the validity period ends, any remaining capacity in the Serverless compute package automatically expires. If a Serverless compute package is about to expire or has expired, you can purchase another Serverless compute package to use.

Other questions

Missing deduction details

A Serverless Compute Package takes effect immediately upon purchase, but deduction details may not appear for up to six hours. Please wait and check again later.

Unsubscribing from the package

You can unsubscribe from a Serverless Compute Package in the console. For detailed instructions, see Unsubscribe from a Serverless Compute Package.