Skip to main content

Provisioned Concurrency

Provisioned Concurrency supports the pre-launch of concurrent instances according to configuration, while the cloud function platform will not actively reclaim these instances and will strive to ensure a sufficient number of concurrent instances are available to handle requests.

You can use this feature to set the Provisioned Concurrency quota for the specified version of the function. By configuring Provisioned Concurrency, you can prepare computing resources in advance, reducing the latency caused by cold starts, runtime environment initialization, and business code initialization.

Set Provisioned Concurrency

You can use the following command to set the Provisioned Concurrency for the specified version of the function:

tcb fn set-provisioned-concurrency <name> <version> <concurrency> // name: function name, version: function version, concurrency: provisioned concurrency

View Provisioned Concurrency

You can view the function's Provisioned Concurrency with the following command:

tcb fn get-provisioned-concurrency <name> [version]

You will see output similar to the following:

Delete Function Provisioned Concurrency

You can delete the function's Provisioned Concurrency with the following command:

tcb fn delete-provisioned-concurrency <name> <version>