tencent cloud

Serverless Cloud Function

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Related Concepts
How It Works
Strengths
Scenarios
Related Products
Purchase Guide
Billing Overview
Billing Mode
Billable Items and Billing Modes
Function Computing Power Support
Free Tier
SCF Pricing
Billing Example
Payment Overdue
Getting Started
Creating Event Function in Console
User Guide
Quota Management
Managing Functions
Web Function Management
Log Management
Concurrence Management
Trigger Management
Function URL
A Custom Domain Name
Version Management
Alias Management
Permission Management
Running Instance Management
Plugin Management
Managing Monitors and Alarms
Network Configuration
Layer Management
Execution Configuration
Extended Storage Management
DNS Caching Configuration
Resource Managed Mode Management
Near-Offline Resource Hosting Model
Workflow
Triggers
Trigger Overview
Trigger Event Message Structure Summary
API Gateway Trigger
COS Trigger
CLS Trigger
Timer Trigger
CKafka Trigger
Apache Kafka Trigger
MQTT Trigger
Trigger Configuration Description
MPS Trigger
CLB Trigger Description
TencentCloud API Trigger
Development Guide
Basic Concepts
Testing a Function
Environment Variables
Dependency Installation
Using Container Image
Error Types and Retry Policies
Dead Letter Queue
Connecting SCF to Database
Automated Deployment
Cloud Function Status Code
Common Errors and Solutions
Developer Tools
Serverless Web IDE
Calling SDK Across Functions
Third-Party Tools
Code Development
Python
Node.js
Golang
PHP
Java
Custom Runtime
Deploying Image as Function
Web Framework Development
Deploying Framework on Command Line
Quickly Deploying Egg Framework
Quickly Deploying Express Framework
Quickly Deploying Flask Framework
Quickly Deploying Koa Framework
Quickly Deploying Laravel Framework
Quickly Deploying Nest.js Framework
Quickly Deploying Next.js Framework
Quickly Deploying Nuxt.js Framework
Quickly Deploying Django Framework
Use Cases
Overview
Solutions with Tencent Cloud Services
Business Development
TRTC Practices
COS Practices
CKafka Practice
CLS
CLB Practice
MPS
CDN
CDWPG
VOD
SMS
ES
Scheduled Task
Video Processing
Success Stories
Tencent Online Education
Online Video Industry
Tencent Online Education
Best Practice of Tencent IEG Going Global
API Documentation
History
Introduction
API Category
Making API Requests
Other APIs
Namespace APIs
Layer Management APIs
Async Event Management APIs
Trigger APIs
Function APIs
Function and Layer Status Description
Data Types
Error Codes
SDK Documentation
FAQs
General
Web Function
Billing FAQs
Network FAQs
Log FAQs
SCF utility class
Event Handling FAQs
API Gateway Trigger FAQs
Related Agreement
Service Level Agreement
Contact Us
Glossary

Dynamic Provisioned Concurrency Metric

PDF
포커스 모드
폰트 크기
마지막 업데이트 시간: 2024-12-02 20:07:18

Overview

Dynamic provisioned concurrency metric is an elastic policy for provisioned concurrency. SCF will periodically collect information about actual concurrent function executions and control the dynamic scaling of the provisioned concurrency feature based on the configured metrics of maximum concurrency, minimum concurrency, and target concurrency usage. This makes the number of provisioned concurrent function instances closer to the actual resource usage, improves the usage of provisioned concurrent instances, and reduces the fees incurred by idle resources. If the number of concurrent instances actually required by a function exceeds that configured dynamic provisioned concurrency metric, auto scaling will be performed as needed.

Application Scenarios

Businesses that are sensitive to idle provisioned concurrency fees.
Functions that are sensitive to cold start with unpredictable business traffic peaks.

How It Works

When the dynamic provisioned concurrency metric is configured, scaling will be performed according to the configured dynamic policy. If the metrics of minimum concurrency, maximum concurrency, and concurrency usage are set, the system will guarantee the minimum concurrency of provisioned resources, and the provisioned concurrency will be dynamically scaled between the minimum and maximum values.
Scaling policy
Concurrency expansion: The system will expand the concurrency when the actual number of business requests increases and triggers the threshold for concurrency expansion until the maximum concurrency is reached. For excessive requests, the concurrency will be expanded as needed. Concurrency expansion frequency: Concurrency expansion will be performed once every ten seconds, without a time window.
Concurrency reduction: The system will reduce the concurrency when the actual number of business requests drops and triggers the threshold for concurrency reduction until the minimum concurrency is reached. Concurrency reduction frequency: A time window of ten minutes is provided to implement a relatively conservative concurrency reduction process; that is, concurrency reduction operations will not be performed repeatedly within the time window, which can be understood as the cooling time for releasing a skill in a game. If not performed previously, a concurrency reduction operation can be performed in ten seconds.
img


Target provisioned concurrency value The target provisioned concurrency value is jointly determined by the metrics of current concurrency and the target concurrency usage.
Target provisioned concurrency value = Current total number of function instances * current concurrency usage / target concurrency usage = Current total number of function instances * (current concurrency / current total number of function instances) / target concurrency usage = Current concurrency/target concurrency usage.
Calculation example of the target provisioned concurrency value: If the current concurrency is 100 and the target concurrency usage is 80%, then the target provisioned concurrency value will be 100 / 80% = 125.
Concurrency usage The concurrency usage of a function refers to the ratio of the number of concurrent requests being responded to by the current function instances to the current total number of function instances. Its value range is [0,1).
Minimum concurrency The minimum concurrency refers to the minimum required number of provisioned concurrent instances of a function, i.e., the lower limit for concurrency reduction.
Maximum concurrency The maximum concurrency refers to the maximum number of provisioned concurrent instances of a function, i.e., the upper limit for concurrency expansion.

Directions

Adding dynamic provisioned concurrency metric

1. Log in to the SCF console and select Function Service on the left sidebar.
2. On the Function Service list page, select the name of the target function to enter the Function Management page.
3. On the left, select Concurrency quota > Provisioned concurrency to enter the Provisioned concurrency tab.
4. On the Provisioned concurrency tab, click Add provisioned concurrency configuration as shown below:


5. In the Add provisioned function concurrency pop-up window, select Dynamic provisioned concurrency metric for Provisioned concurrency type, select the function version, set Min concurrency, Max concurrency, and Concurrency usage metric based on the business scenario, and click Submit as shown below:

After completing the settings, you can view the configuration status in Provisioned Concurrency. It will take some time for the SCF backend to add the instances and display the number of ready-to-start concurrent instances and completion status in the list.

Updating dynamic provisioned concurrency metric

When updating the dynamic provisioned concurrency metric, you can modify Provisioned concurrency type, Min concurrency, Max concurrency, and Concurrency usage metric.
1. Log in to the SCF console and select Function Service on the left sidebar.
2. On the Function Service list page, select the function for which to update the provisioned concurrency to enter the Function Management page.
3. On the left, select Concurrency quota > Provisioned concurrency to enter the Provisioned concurrency tab.
4. On the Provisioned concurrency tab, select Settings on the right of the target version.
5. In the Set provisioned function concurrency pop-up window, update the set value and click Submit as shown below:


Note:
Basic provisioned concurrency and dynamic provisioned concurrency metric are supported for the provisioned concurrency type. After the provisioned concurrency type is updated, the previously set type will become invalid.

Deleting dynamic provisioned concurrency metric

1. Log in to the SCF console and select Function Service on the left sidebar.
2. On the Function Service list page, select the function for which to delete the provisioned concurrency to enter the Function Management page.
3. On the left, select Concurrency quota > Provisioned concurrency to enter the Provisioned concurrency tab.
4. On the Provisioned concurrency tab, select Delete on the right of the target version as shown below:


5. In the Delete provisioned function concurrency quota pop-up window, click OK.

도움말 및 지원

문제 해결에 도움이 되었나요?

피드백