Overview

Last updated: 2019-08-08 15:15:18

PDF

Tencent Cloud Serverless Cloud Function (SCF) provides a serverless execution environment, enabling companies and developers to execute code without the need to purchase and manage servers. All you need to do is write the core code with SCF supported languages and set code execution conditions. Then your code can run on Tencent Cloud elastically and securely. SCF is a computing platform well suited for real-time file processing and data processing.

Evolution of Computing Resources

With the development of cloud services and the high abstraction of computing resources, Tencent Cloud provides a wide variety of computing resource options from physical servers to cloud-based functions at different abstraction levels.

  • Cloud Physical Machine (CPM): Scaling is at the physical machine level. You enjoy the physical computing resources exclusively, which provides the best security.
  • Cloud Virtual Machine (CVM): This virtualizes hardware devices, and scaling is at the virtual machine level. You share the physical machine resources with other tenants, and you can configure CVM metrics on your own, which is simpler than deployment and iteration.
  • Containers : This virtualizes operating systems, and scaling is at the service level. The test and production environments are exactly the same, making testing and deployment very convenient.
  • Serverless Cloud Function (SCF): This virtualizes runtime environments, and scaling is at the function level. This is the smallest unit of existing computing resources, which features full automation, one-click deployment, and high scalability, and is an ideal choice for lightweight service deployment.

What Is Serverless?

Serverless does not mean that there is no server. It is just that you do not need to care about the underlying resources, log in to a server, or optimize the server. Instead, you only need to care about the core code snippets while skipping the complex and cumbersome basic work. These code snippets are completely event-triggered, and SCF automatically adjusts service resources in parallel based on the requests. The serverless architecture has near-infinite scalability, and no resources will be executed when idle. The code is executed in a stateless manner, which easily enables fast iterations and rapid deployment.

Introduction of SCF

SCF is a serverless execution environment provided by Tencent Cloud. All you need to do is write simple and single-purpose functions and associate them with events generated by your Tencent Cloud infrastructure and services.
When using SCF, you only pay attention to your own code. The underlying computing resources and tasks are fully managed by Tencent Cloud, including maintenance of server CPUs, memories, networks and other configurations/resources, code deployment, elastic scaling, load balancing, security upgrade, and resource execution monitoring. You only need to provide code written in languages supported by SCF (Python, Node.js, and Java currently). In addition, this means that you cannot log in to or manage the server, or customize the system or environment.

When the code is executed, scaling will be made based on the request load to meet the needs for service availability and stability in different scenarios, with no manual configuration or intervention required. From several requests per day to thousands of requests per second, SCF can automatically scale at the underlying layer. A function is automatically deployed across multiple availability zones within a region, enabling extremely high fault tolerance. You only need to pay for running functions, and no fees will be incurred if the code is not running.

You can customize the code execution time, such as when a file is uploaded to or deleted from a COS bucket or an application calls the code through the SDK. You can also specify periodic code execution. Therefore, SCF can be used as a data processing trigger for the COS service to easily implement IFTTT logic. Scheduled automated tasks can also be flexibly built to free you from manual operations and easily construct an elastic and controllable software architecture.

If you wish to manage computing resources by yourself, Tencent Cloud also provides the following computing services:

  • Cloud Virtual Machine provides instance configurations in a rich set of different specifications. You can customize the configurations such as CPU, memory, operating system, network, and security of the computing resources, but you need to customize policies to achieve cross-AZ fault tolerance and resource scaling.
  • Tencent Kubernetes Engine provides a highly scalable container management service that allows you to arrange containers in clusters based on the requirements of resources and availability to meet your business or application-specific needs.