This topic describes how to use Function Compute to set up a static resource deployment service at the frontend based on an architecture with separated frontend and backend.
In most cases, enterprises use GitLab to host frontend code, Jenkins to listen for webhook messages, and then publish the messages to Object Storage Service (OSS). This solution is flexible but has the following shortcomings:
- You need to purchase a server to set up Jenkins. This generates compute and storage fees.
- Professional O&M personnel are required to ensure the stable operation of servers.
- OSS SDKs are difficult to be integrated.
The following figure shows the architecture of the solution.
In the preceding figure:
- Function Compute detects changes in the frontend code repository when you commit code to a code repository.
- Function Compute downloads the submitted branch and uploads files to OSS.
- Alibaba Cloud CDN (CDN) is used to accelerate frontend resources.
- Serverless: You do not need to purchase servers.
- O&M-free: You do not need to deploy and configure Jenkins.
- Comprehensive features: Features such as log query, performance monitoring, and alerting are supported.
- One-stop: Event-driven trigger modes are supported.
- Low cost: You are charged based on the actual amount of resources consumed. For more information, see Billing overview.