Function Compute provides two modes for instance management: the pay-as-you-go mode and the reserved mode. This topic describes the characteristics of these two modes.

Pay-as-you-go mode

In pay-as-you-go mode, instances are allocated and released by Function Compute. When Function Compute receives function invocation requests, it dynamically schedules resources to provide an elastic and reliable execution environment and help simplify resource management.

However, cold start is unavoidable during dynamic scheduling of resources, which has negative impacts on online applications that are sensitive to response latency.

Reserved mode

In reserved mode, instances are allocated and released by users, and are billed based on their running duration.

An instance in reserved mode is ready for use after it is created. This eliminates the impacts caused by cold start.

By default, instances in reserved mode are prioritized over those in pay-as-you-go mode. When Function Compute receives function invocation requests, it preferentially uses instances in reserved mode to handle the requests. If the instances in reserved mode are insufficient to handle all the requests, Function Compute adds instances in pay-as-you-go mode as an addition to handle the remaining requests.

An instance in reserved mode is billed based on its running duration, which starts when the instance is started and ends when the instance is released. Therefore, even if an instance in reserved mode that is not released does not process any requests, you must pay for it. On-Demand Resources
Note Before you call a Function Compute API operation to release an instance in reserved mode, make sure that no new requests are sent to the instance.

For more information about pricing and billing, see Billing overview.