Last update:2024-12-26 18:57:31
Edge Cloud Apps (ECA) is a serverless edge function compute runtime environment powered by the V8 engine within the Edge Application platform. ECA allows you to execute custom JavaScript code on CDNetworks CDN edge nodes. Leveraging our all-in-one DevOps platform, you can seamlessly manage the entire application lifecycle, from code repository, development, and debugging to automated deployment, monitoring, and statistical analysis. This empowers your web applications with faster response times and enhanced scalability.
The ECA function compute workflow is illustrated below:
The following provides a detailed explanation of each step in the function workflow:
Function Creation: Create new custom functions directly within the CDNetworks console, or leverage our provided sample function templates as a starting point to quickly build your edge computing logic. For detailed instructions, refer to Quick Start Guide for ECA Function.
Code Development: Write and edit your function code using our integrated online IDE. The platform supports standard JavaScript by default, allowing you to take full advantage of its flexibility and rich ecosystem. Furthermore, you can compile code written in languages like C, C++, Rust, and Go into WebAssembly (Wasm) files and run them on our platform for enhanced performance and broader language support.
Automated Deployment: ECA supports automated function deployment. By configuring a deployment schedule, the system will automatically deploy your function code to our global edge nodes, eliminating manual intervention, accelerating iteration speed, and reducing potential human error.
Trigger Configuration: Triggers are key components that connect your functions to your domains and applications. By configuring triggers, you can associate functions with specific domains and define rules and conditions that trigger function execution, such as URL path matching, request header matching, and cookie matching. When a user’s request meets these rules, the trigger automatically invokes your function, enabling various edge computing scenarios like dynamic content generation, request rewriting, and security protections.
User Request: When a user accesses your website or application via the CDN, if the request matches the predefined trigger conditions, your function will be executed on the edge node, minimizing latency and maximizing response speed.
Function Response: When a function is triggered, the system creates a function instance to execute your code. After execution, the generated response is returned to the user. You can customize the response content, HTTP status code, and header information based on your business logic for flexible control.
Real-time Data Collection: To help you monitor function health and performance, Edge Cloud Apps collects real-time function execution data, including request counts and function runtime, among other key metrics. This data is aggregated in the CDNetworks backend for subsequent analysis and monitoring.
Operational Data Analysis: The Edge Cloud Apps console provides intuitive data visualization tools and charts to summarize and analyze collected function operational data. You can easily view function execution details, including request counts and associated billing information, facilitating optimization and adjustments.