Help Center/ AI DataLake/ Billing/ Elastic Resource Billing
Updated on 2026-11-11 GMT+08:00

Elastic Resource Billing

Use Cases of Elastic Resources

You do not need to purchase elastic resources in advance. Instead, you can select On-demand or Hybrid when creating an endpoint to use elastic resources as needed. Elastic resources are billed by second and are released immediately when jobs are complete. You do not need to manage the lifecycle of resources.

If a job you submit requires elastic resources, the system allocates resources based on the POD specifications. For details, see Resource Normalization.

When creating an engine endpoint, you need to select a resource allocation mode. Two modes are available for using elastic resources:

  • On-demand: Only elastic resources are used. You do not need to purchase them in advance, and you pay for how many resources you use.

    This mode is suitable for scenarios where resource usage is unstable, such as occasional testing and verification, burst workloads, development and testing environments, and service exploration.

  • Hybrid: Both reserved resource pools and elastic resources are used. For details, see Resource Allocation Rules in Hybrid Mode.

Resource Allocation Rules in Hybrid Mode

In hybrid mode, the system preferentially uses resources from reserved resource pools for new jobs.

  • Only reserved resource pools will be used as long as they provide sufficient resources.
  • If reserved resource pools do not provide sufficient resources, the system automatically schedules elastic resources. In this case, you will be billed for the elastic resources on a pay-per-use basis.

This hybrid mode combines the stability of reserved resources with the flexibility of pay-per-use resources, and can effectively adapt to service changes.

Billing Rules

Elastic resources are billed on a pay-per-use basis. You pay for what you use. Billing is calculated per second and settled at the top of every hour.

Fee = Unit price of the instance × Usage duration × Number of resources

The unit price varies depending on the instance flavor. The system provisions instance flavors based on service requests.

If instance flavors do not match the resources required by a job, the system automatically performs Resource Normalization.

Resource Normalization

Elastic resource billing: The resources actually provisioned, rather than the resources requested by jobs, are billed.

Resource normalization refers to the process in which the system rounds up the provisioned resources based on service requests during elastic resource allocation. The 1:2, 1:4, or 1:8 vCPU-to-memory ratio is used to match available instance specifications. The purpose is to simplify resource scheduling and management and improve resource utilization.

The system allocates resources based on the POD specifications, which support 0.5, 1, 2, 4, 8, 16, 32, and 48 vCPUs.

Normalization trigger conditions (normalization is triggered when either condition is met):

  • The requested job resources do not fully match available instance specifications.
  • vCPUs or memory does not meet the minimum requirements.

Example:

  1. A user submits a job that requires 1 vCPU and 3 GiB memory.
  2. However, there is no instance offering 1 vCPU and 3 GiB memory. According to the resource normalization rule, the system provisions 1 vCPU and 4 GiB memory.

    Reason for normalization: There are no instance flavors offering 3 GiB memory, so instances offering 4 GiB memory are provisioned.

Use Cases

Pay-per-use elastic resources are suitable for scenarios where service volume fluctuations are unpredictable and there is burst traffic. The following are some examples:

  • Services in the exploration phase, where requirements are not clear and change frequently. You do not want to pay for idle resources.
  • Short-term or one-off tasks, for which you release resources after completion to prevent waste

Billing Notes

  • If a job fails due to a custom image issue, the elastic resources consumed during the job execution are still billed.
  • If a job fails due to a resource scheduling exception (resource provisioning failure), the elastic resources consumed are not billed.

Billing Example

The prices are for reference only. For the actual prices, see the pricing details page.

A user configures three endpoints with different resource allocation modes.

Assume that the three endpoints are bound to the same reserved resource pool that has been prepaid. The unit price of pay-per-use elastic resources is $0.08 USD/vCPU/hour. Table 1 shows the job sequence diagram. Each T period represents one hour.

  • Endpoint 1: on-demand mode

    Resource configuration: No reserved resources are available. Only elastic resources are used.

    Job execution:

    • Job A: It uses 20 vCPUs and keeps running for 1 hour.
    • Scheduling mode: Only pay-per-use elastic resources are allocated.
    • Fee: 20 vCPUs x 1 hour x $0.08 USD/vCPU/hour = $1.6 USD
  • Endpoint 2: reserved mode

    Resource configuration: 10 vCPUs from reserved resources are allocated.

    Job execution:

    • Job B: It uses 10 vCPUs and keeps running for an hour.
    • Scheduling mode: 100% reserved resources are used.
    • Fee: billed based on the reserved resource pool and prepaid
  • Endpoint 3: hybrid mode

    10 vCPUs from reserved resources are allocated to endpoint 3. The following jobs are executed in sequence.

    Table 1 Job sequence

    Job

    Start Time

    End Time

    Requirements and resources

    Scheduling Logic

    Fee Calculation

    Job C

    T1

    T3

    6 vCPUs

    There are sufficient reserved resources (10 vCPUs). Only reserved resources are used.

    Billed based on the reserved resource pool and prepaid

    Job D

    T2

    T4

    10 vCPUs

    The available reserved resources are insufficient for the job. 10 vCPUs from elastic resources are scheduled for running the job.

    Elastic resources:

    10 vCPUs x 2 hours x $0.08 USD/vCPU/hour = $1.6 USD

    Job E

    T4

    T6

    20 vCPUs

    After the previous jobs are completed and resources are released, 10 vCPUs are available in the reserved resource pool but are insufficient for the job, so only elastic resources are used.

    Elastic resources:

    20 vCPUs x 2 hours x $0.08 USD/vCPU/hour = $3.2 USD

    Based on the resource usage of the three endpoints, the total fee is as follows.

    Table 2 Resource usage of the three endpoints

    Endpoint

    Resource Allocation Mode

    Reserved Resource Pool Fee

    Elastic Resource Fee

    Total

    Endpoint 1

    On-demand

    Prepaid

    $1.6 USD

    $1.6 USD

    Endpoint 2

    Reserved

    Prepaid

    -

    Prepaid

    Endpoint 3

    Hybrid

    Prepaid

    $1.6 USD + $3.2 USD

    $4.8 USD

    Total

    -

    Prepaid

    $6.4 USD

    Prepayment for the reserved resource pool + $6.4 USD

Suggestions on Optimizing the Cost of Elastic Resources

  • When service load and resource consumption are stable, reserved resources are recommended.
  • In scenarios where basic load is stable but the peak load fluctuates, the hybrid mode is recommended. Reserved resources meet basic consumption requirements, and elastic resources meet demands in peak hours.
  • To handle unpredictable service loads and frequent traffic bursts, you can purchase a small volume of reserved resources and mainly use elastic resources.