Tencent Cloud
Tencent Cloud
Serverless Cloud Function

Serverless Cloud Function

A secure, stable, easy-to-use and efficient serverless function computing platform with high cost performance.

Contact Sales

Overview

Tencent Cloud's Serverless Cloud Function (SCF) is a serverless execution environment that enables you to build and run applications without having to purchase and manage servers. Simply code in a supported language and set the execution conditions, and your code can be run on the Tencent Cloud infrastructure elastically and securely. SCF is an ideal computing platform for use cases such as real-time file processing and data processing.

Benefits

Ease of Use

Ease of Use

By just writing the most important "core code" without concern for peripheral components, you can greatly reduce the complexity of the service architecture. SCF can scale up and down based on the number of requests with no manual configuration required. Regardless of the volume of requests to your application at any given time, SCF can automatically arrange suitable computing resources to meet business needs.
High Efficiency

High Efficiency

SCF is compatible with multiple different frameworks, allowing you to focus on the development of your core code. The development of individual modules does not require knowledge of the code details. SCF can be used to write certain single-purpose, logically independent business modules. Each individual function is run, deployed and scaled separately and can be automatically deployed after you upload the corresponding code, accelerating independent development and iteration.
High Stability and Reliability

High Stability and Reliability

If an available zone is down due to a natural disaster or power failure, SCF can automatically utilize the infrastructure of other available zones for code execution, eliminating the risk of service interruptions inherent in single-availability zone operations. Event-triggered workloads can be achieved using SCF that leverages different cloud services to meet the requirements of different business scenarios and further strengthen your service architecture.
Simplified Management

Simplified Management

With SCF, complex configurations and management of OS intrusions, login risks, file system security, network security and port monitoring are things of the past. Centralized platform functions ensure user isolation through customized containers. SCF can be deployed and tested in one click with no complicated configuration files required.
Reduced Overhead

Reduced Overhead

SCF does not incur any fees when not in use, significantly reducing overhead for some non-resident business processes. When SCF executes code, you are billed for the volume of requests and the running time of the computing resources. This pricing model has obvious advantages and is extremely attractive to new developers just starting out.

Features

Code Management

Once the code is uploaded, SCF can provide you with a variety of code management methods:

You can edit the code through the console. This method is suitable for business code with no external dependencies which can be edited directly in the console.

You can zip together all the dependencies and the code and upload the zipped package to SCF. The SCF platform will automatically extract and execute the entry function.

You can zip together all the dependencies and the code, upload the zipped package to Tencent Cloud Object Storage (COS) and specify the bucket and file object where the code resides in SCF. The SCF platform will automatically download the function code.

Multiple Development Environments Supported

SCF supports a variety of development environments, so you can choose the development language that suits your needs when writing the functions. At present, the following languages are supported: Python 2.7 & 3.6, Node.js 6.10 and Java 8.

Automatic Scaling
SCF supports real-time elastic scaling in millisecond, so it can be fully scaled up or down based on the volume of requests. Dynamic load balance distributes requests to a virtually unlimited number of function instances on the backend, eliminating the need for any manual configuration and operation and satisfying different scenarios with concurrency volumes ranging from 0 to tens of thousands.
Event Triggers

Once the code is uploaded, SCF can provide you with a variety of code management methods: SCF supports the setting of multiple triggers to determine when the code should be executed. When a trigger condition (event) is met, the code automatically starts running, and infrastructure resources are automatically scheduled for auto-scaling and reclaiming based on the volume of requests, which can significantly improve computational efficiency.

Currently, the following triggers are supported:

Cloud Object Storage (COS): SCF can be triggered when files are uploaded to or deleted from specific COS buckets. More operations can be performed on the files. For example, when an image is uploaded to a specific bucket, it will be compressed or cropped to fit mobile devices with different resolutions.

Timer: SCF can be triggered by a timer, so you can build a more flexible automatic control system.

Manual trigger: SCF can be manually triggered through the cloud API/console, so you can debug and use SCF with more convenience and transparency.

CMQ topic queue trigger: SCF can be triggered by messages in the CMQ topic queue where the CMQ message queue is used to decouple the event, helping you connect to more applications.

Monitoring and Logging
SCF provides detailed logs by which you can easily view the operational status of a function and debug, test and audit the code. Relevant monitoring indicators can be reported to help you quickly understand the overall running condition of the function. Meanwhile, you can customize the monitoring indicators to perform deeper and more extensive monitoring of SCF.

Once the code is uploaded, SCF can provide you with a variety of code management methods:

You can edit the code through the console. This method is suitable for business code with no external dependencies which can be edited directly in the console.

You can zip together all the dependencies and the code and upload the zipped package to SCF. The SCF platform will automatically extract and execute the entry function.

You can zip together all the dependencies and the code, upload the zipped package to Tencent Cloud Object Storage (COS) and specify the bucket and file object where the code resides in SCF. The SCF platform will automatically download the function code.

Scenarios

Real-time File Processing
In application scenarios such as video and social networking, users frequently upload large caches of image, audio and video files, imposing high real-timeness and concurrency requirements on the processing system. For example, for user-uploaded video clips, we can use multiple SCFs corresponding to different resolutions (1080p, 720p, etc.) for separate processing, providing users with the performance they need in different scenarios despite the narrow bandwidth and unstable connections when using cellular networks.
In application scenarios such as video and social networking, users frequently upload large caches of image, audio and video files, imposing high real-timeness and concurrency requirements on the processing system. For example, for user-uploaded video clips, we can use multiple SCFs corresponding to different resolutions (1080p, 720p, etc.) for separate processing, providing users with the performance they need in different scenarios despite the narrow bandwidth and unstable connections when using cellular networks.
Real-time File Processing