Last update:2024-09-03 15:09:54
This document introduces fundamental concepts related to Edge Application, helping you understand and utilize CDNetworks’ products more effectively.
Edge computing is a distributed computing paradigm that shifts computing resources and data storage away from centralized data centers to locations closer to where data is generated and consumed. By processing data at the “edge” of the network, edge computing can significantly reduce latency, alleviate network congestion, and enhance real-time responsiveness.
Serverless is a cloud computing execution model where you can run code without provisioning or managing servers. The cloud provider takes care of the underlying infrastructure, including server configuration, scaling, and security. You only need to write and deploy your code to the Serverless platform, which automatically allocates resources and executes your code as needed. CDNetworks Edge Application is a Serverless platform.
Here are some key benefits of Serverless:
Edge computing and Serverless are complementary technologies that drive the evolution of cloud computing. Edge computing brings computation and data storage closer to users, providing an ideal runtime environment for Serverless functions. This proximity reduces latency and improves performance. At the same time, the serverless nature of these functions, with their no-maintenance and pay-as-you-go characteristics, simplifies development and deployment of edge applications. Developers can focus on business logic innovation and implementation without managing servers.
CDN edge nodes are a critical infrastructure component of a Content Delivery Network (CDN). These servers are geographically distributed, positioned closer to users. Edge nodes cache static content like web pages, images, and videos, accelerating content delivery. They also provide an ideal runtime environment for edge-based Serverless computing.
FaaS (Function-as-a-Service) is a serverless computing service model that allows developers to run code without managing servers. In Serverless computing, a function is an independent unit of code deployed on a FaaS platform and triggered by events, such as HTTP requests or database updates. As a core building block of Serverless architecture, functions allow developers to break down business logic into smaller, independent units, enabling more flexible, scalable, and efficient application deployment. CDNetworks Edge Application provides a FaaS platform, allowing you to create and deploy Serverless functions to edge nodes, empowering various edge computing scenarios.
BaaS (Backend-as-a-Service) complements FaaS by providing pre-built backend services, such as databases, message queues, authentication, and storage. It covers a wider range of backend scenarios beyond Serverless computing. When using BaaS services, developers don’t need to worry about backend operations and maintenance. They simply request the services and enjoy convenient and reliable backend support, simplifying backend development, reducing costs, and allowing them to focus on business logic.
Serverless JavaScript refers to JavaScript code written and executed within a serverless computing environment. Developers use serverless platforms to deploy JavaScript functions that execute in response to specific events, such as HTTP requests, file uploads, or database changes.
WebAssembly (WASM) is a new code format that can run in modern web browsers. It provides a portable, high-performance, and secure way to execute code. Developers can compile functions written in languages like C, C++, and Rust into WebAssembly and run them on Serverless platforms.
The V8 engine is a high-performance JavaScript and WebAssembly engine developed by Google. It is widely used in Chrome browsers, Node.js, and many Serverless platforms, providing a robust JavaScript runtime environment. CDNetworks Edge Application utilizes the V8 engine to execute Serverless functions efficiently, supporting the JavaScript ecosystem and offering developers a faster and more reliable Serverless computing experience.
A cold start refers to the process of allocating compute resources and initializing the environment when a Serverless function is invoked after a period of inactivity. This often leads to increased latency during the first invocation. When the function is reactivated, the system needs to launch a new execution environment, the time required for which depends on the function’s configuration and runtime.
In Serverless computing, the runtime refers to the execution environment used to execute function code within the Serverless environment. It includes the programming language interpreter or compiler, necessary libraries, and dependencies required by the function code. The runtime is responsible for loading the function code into memory, executing the code, and handling input/output.
The Service Worker API is a browser API that allows developers to run JavaScript code in the background of a web browser, independent of the web page. This code can continue running even when the web page is closed. It provides developers with powerful capabilities, including creating offline experiences, intercepting network requests, and enabling push notifications. CDNetworks supports the complete Service Worker API, allowing you to call its functions within your function code to extend the capabilities of your edge applications.
In Serverless computing, a trigger is a mechanism that detects the occurrence of a specific event, such as an HTTP request or a database update. When the event occurs, the trigger automatically performs a pre-configured action, typically triggering a Serverless function. This enables an event-driven computing model.
In Serverless computing, grayscale release is a deployment strategy that allows developers to gradually deploy new versions of Serverless functions or services to the production environment. By monitoring and analyzing the new version, the traffic proportion is gradually increased to verify its stability and performance. In case of issues, it can be quickly rolled back to the previous version, minimizing risks.