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

Configure Function Plug-Ins

PDF
Focus Mode
Font Size
Last updated: 2025-06-17 16:31:12

Feature Overview

The function platform now supports the "plug-in" feature, allowing users to upload auxiliary services such as log collection and metric reporting as plug-ins and bind them in the function. Complete the feature implementation similar to the Sidecar in the container ecosystem in this mode, decoupling the business function from the auxiliary services. At the same time, manage the lifecycle of the plug-in in combination with that of the function instance. Users can separately declare the running time of the plug-in after the main function returns the result to ensure the real-time data and integrity of the auxiliary services.

Working Mode

Create and Bind

The mirror file of a plug-in will be stored based on the name and version of the plug-in. When binding a plug-in to a function, it will be bound based on the specific plug-in version and function version. Currently, a maximum of 5 plug-in versions can be bound to one function version, and they must be unique.

Recommended Usage Method

We recommend that users focus on compiling the core business logic in the main function and decouple the core business logic from auxiliary components. These auxiliary components can collaborate with the main function by functioning in the form of function plugins. Common plugin usage scenarios include:
Log gathering: Collection, formatting, and submission of logs.
Metric reporting: Collect service performance metrics and send them to the monitoring system. Centralize monitoring logic management and reduce the burden on the main service.
APM tool: Real-time monitor and analyze application performance metrics, promptly discover and resolve potential performance bottlenecks and failures, and underwrite the stable operation of applications.
Tencent Cloud Mesh (TCM): Service communication, traffic management.
Configuration management: Dynamically manage service configurations, support hot updates, and avoid frequent service restarts to apply new configurations.
Probe health: Check whether specific components are working properly.
Other system integrations.

Loading and Accessing at Runtime

In Serverless Cloud Function (SCF), the plug-in feature is implemented through a dynamic loading mechanism, achieving capabilities similar to the Kubernetes Sidecar mode. When a function instance starts up, all plug-ins are started asynchronously, and the plug-in startup phase does not block the invocation of the main function. Plug-ins support running independent processes (such as log agents, monitoring services) and interact with the main function via the local network (127.0.0.1:port) or a shared file directory (/tmp). Unlike static dependencies in "layers", plug-ins emphasize dynamic service capabilities (such as traffic proxy, real-time security verification), allowing backend logic to run continuously within the function lifecycle, unifying feature expansion and resource isolation.

Related Documentation

You can create a plugin through the Serverless Console Create Plugin.
When creating or updating a function, bind a plugin.


Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback