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.