To prevent excessive function invocations and uncontrolled costs, each Alibaba Cloud account has a default limit of 300 concurrent instances per region. Function Compute also provides function-level quotas to prevent a single function from using too many instances. This protects backend resources and helps avoid unexpected charges.
Use cases
Protect the concurrency of critical functions.
For example, two functions,
function-aandfunction-b, share an account-level quota.function-ais a critical business function, butfunction-bis prone to excessive invocations that can impactfunction-a. You can set a quota forfunction-bto prevent it from using too many instances, ensuringfunction-ahas sufficient instances. You can also set reserved concurrency forfunction-ato reserve a specific number of instances for it.Protect a downstream service.
For example, if your Function Compute functions frequently access an RDS database that has limited processing capacity, you can set a quota on the functions that access RDS to prevent them from overwhelming the database.
Block a malfunctioning function.
For example, if you notice a function invoking abnormally, you can set its quota to 0 to block all invocations.
Prevent runaway function invocations.
For example, user actions in a browser or client can be unpredictable. Setting a function-level quota prevents uncontrolled invocations and helps you avoid unexpected charges.
Limitations
By default, a single Alibaba Cloud account has a total concurrency limit of 300 instances per region. Your account's actual quota is displayed in the Quota Center. To request a higher quota, submit an application in the Quota Center.
The maximum quota for a single function is 90% of the account-level quota for the region. The sum of all function quotas in a region cannot exceed 90% of the account-level quota for the region.
For example, if the account-level quota for the region is 300, the maximum quota for a single function is 270. If you set the quota for one function to 100, the combined quotas for all other functions in that region cannot exceed 170.
Set the elastic instance quota
Single function
Log on to the Function Compute console. In the left-side navigation pane, choose .
In the top menu bar, select a region. On the Function page, click the target function.
Click the Scaling configuration tab, and then click Edit in the Function Quota section.
In the Edit Quota panel, set the Elastic Instance Quota and click OK.
Multiple functions
Log on to the Function Compute console. In the left-side navigation pane, choose .
On the Function Quotas page, click Create Quota. In the Create Quota panel, select the target functions, set the Elastic Instance Quota, and click OK.
Resource quota locking for GPU functions
After setting the elastic instance quota, your account locks a portion of the total resource quota for the function. Locked resources are reserved exclusively for that function. For example, if you set the elastic instance quota for a GPU function to 2, the system locks a corresponding number of GPU card resources. The locked quota varies by scenario, as shown in the following table.
For the total quotas for different series of GPU cards, see Quotas and limits.
Scenario | Quota locking logic | Example configuration | Locked function quota |
Single version, single card type | elastic instance quota × number of cards per instance | Tesla series, single card | Locks 2 Tesla cards |
Multiple versions, same card type | Calculate | Version 1: Tesla series, single card Version 2: Tesla series, 8 cards | Locks 16 Tesla cards |
Multiple versions, different card types | For each card type, calculate | Version 1: Tesla, single card Version 2: Ada.1 series, single card Version 3: Ada.1 series, 8 cards | Locks 2 Tesla cards and 16 Ada.1 cards |