All Products
Search
Document Center

:Overview

最終更新日:Jan 23, 2024

Function Compute provides two modes to manage instances: on-demand mode and provisioned mode. This topic describes the benefits of the two modes, and you can use the modes based on your business requirements.

On-demand mode

In on-demand mode, instances are allocated and released by Function Compute. When Function Compute receives function invocation requests, Function Computed dynamically schedules resources to provide an elastic and reliable execution environment, which streamlines resource management.

When resources are dynamically scheduled, cold starts may occur, which imposes impacts on latency-sensitive business.

Provisioned mode

In provisioned mode, you must allocate and release instances, and you are charged based on the running duration of instances.

A provisioned instance is ready for use after it is created. This eliminates the impacts caused by cold starts.

By default, provisioned instances are prioritized over on-demand instances. When Function Compute receives function invocation requests, Function Compute preferentially uses provisioned instances to handle the requests. If the provisioned instances are insufficient to handle all the requests, Function Compute transfers the remaining requests to on-demand instances.

A provisioned instance is billed based on its running duration from the time when the instance is started to the time when the instance is released. Even if a provisioned instance does not process requests, you are still charged for the instance unless you release it.

image
Note

Before you call a Function Compute API operation to release a provisioned instance, make sure that no new requests are sent to the instance.

For more information about the pricing and billing of Function Compute, see Billing overview.