How it works
- Scenarios where ER is not used
Client requests are processed in the following steps: 1→8→9→4. After a client sends a request to the CDN gateway, Alibaba Cloud CDN searches for the requested resource in the CDN cache. If the requested resource is not cached on CDN nodes, the request is redirected to the origin server to retrieve the requested resource. If the requested resource is cached on CDN nodes, the requested resource is directly returned to the client.
- Scenarios where ER is used
- ER runs JavaScrip code to compute and process requests and returns data to clients. Client requests are processed in the following steps: 1→2→3→4. This process is a typical scenario of Function as a Service (FaaS). ER functions as the server and directly processes and responds to requests. In this scenario, you do not need to deploy servers.
- ER initiates subrequests to retrieve data from other cloud services and processes the data. Client requests are processed in the following steps: 1→2→5→3→4.
- ER stores processed data to or reads processed data from the cache or key-value (KV) storage media. Client requests are processed in the following steps: 1→2→6→3→4.
- ER can automatically use a proxy to redirect requests to the standard CDN back-to-origin process. Client requests are processed in the following steps: 1→2→7→8→9→10→3→4. In this process, ER applies computing logic before it follows the standard CDN process. You can use ER to perform relevant computing tasks such as remote asynchronous authentication before Alibaba Cloud CDN follows the standard process to search for requested resources in the CDN cache or redirect requests to origin servers.
|Authentication||Custom Alibaba Cloud CDN authentication and asynchronous authentication|
|Originless responses||Static content delivery|
|Web applications and applets||
|Beacon||Capturing and analytics of edge tracking data|
Work with ER
The first private preview of ER is completed. If you have activated ER during the preview, you can continue to use ER free of charge. The next private preview of ER is expected to begin in April 2021.
- The code file must be smaller than 1 MB.
- The CPU time that is consumed to process an individual request must be less than 50 milliseconds.
- The response time for an individual request must be less than 120 seconds.
- The total amount of memory consumed on an individual CDN node must be less than 128 MB.