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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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 some data processing systems, it is often necessary to process a mass of data on a periodic or scheduled basis. For example, a securities brokerage firm analyzes the number of transactions every 12 hours to rank the top five offerings in terms of trading volume, or a flash sale website processes its daily transaction flow log to determine the errors caused by stock outages and analyze the popularity and trends of products. The near-unlimited expansion capability of SCF enables you to perform large-capacity data computation with ease. SCF can be used to execute multiple mapper and reducer functions concurrently on the source data, reducing the time needed to complete any job. Compared with traditional workflows, SCF will reduce resource waste from idling and realize cost savings.
SCF is highly compatible with other Tencent Cloud services, enabling you to easily build highly scalable mobile or web applications with a rich set of serverless backends. Such applications can be run in multiple IDCs with high availability, saving you the effort of managing scaling, backups and redundancies.
After an AI model is trained, using the inference service is easy. Our Serverless Cloud Function (SCF) allows you to package the data model into an API request and the code is executed upon reception. There is no upfront investment in servers and GPUs. You only pay for what you use, and you get the automatic high-concurrency scaling capability we provide.
SCF is billed monthly in a postpaid model, so you only pay for what you use. The bill for the current month will be in USD and will arrive between the 3rd and 5th day of the following month. The monthly statement for SCF consists of three items, resource usage fees, call fees and outgoing traffic fees. Each item is charged based on the actual usage in its own calculation method. The amount owed is rounded to the cent in USD. For more information on pricing, see the Pricing doc. In addition, if you sign up for the SCF service, you will be entitled to a certain amount of resources and number of calls free of charge each month. For more information, see the free quota.