Function Compute provides pay-as-you-go instances and reserved instances. This topic describes the characteristics of the two types of instances. You can select an instance type as needed.
Pay-as-you-go instances are allocated and released by Function Compute. When Function Compute receives function invocation requests, it adds pay-as-you-go instances to handle the requests. After the requests are processed, Function Compute releases the instances. Pay-as-you-go instances are scalable and reliable. Pay-as-you-go instances help you simplify resource management work.
However, you cannot avoid cold start when you use pay-as-you-go instances, which affects your online applications if they are sensitive to the response latency.
Reserved instances are allocated and released by users, and are billed based on their running durations.
A reserved instance is ready for use after it is created. This completely eliminates impacts caused by cold start.
By default, reserved instances are prioritized over pay-as-you-go instances. When Function Compute receives function invocation requests, it preferentially uses reserved instances to handle the requests. If the reserved instances are insufficient to handle all the requests, Function Compute adds pay-as-you-go instances as an addition, and sends the remaining requests to the pay-as-you-go instances.
For more information about pricing and billing, see billing methods.