EdgeRoutine (ER) is a serverless computing environment developed by Alibaba Cloud Content Delivery Network (CDN). ER is deployed on edge nodes to serve your workloads. ER helps you run custom JavaScript code on edge nodes. You do not need to manage underlying deployment infrastructure, such as hardware configurations, region settings, scheduling, and elastic scaling. After you use EdgeRoutine CLI to deploy code to the production environment, the system automatically runs the code on all edge nodes of your accelerated domain name. The edge nodes process requests in different regions worldwide by following the logical rules of the code.


Traditional CDN services are only used to cache and distribute content, but cannot provide the computing feature for your workloads. To process a large number of requests through edge nodes, CDN must redirect the requests to the origin server that supports complex computing. This back-to-origin process consumes resources on your origin server and requires a complex origin architecture. ER allows edge nodes to provide the computing feature. You can use ER to customize the CDN service and process complex requests. This feature reduces the number of back-to-origin requests and minimizes the latency of content delivery. Edge nodes support high availability, high scalability, and global load balancing. This increases the application scope of the ER feature. ER provides a computing environment on each edge node and allows you to deploy JavaScript code in different ways.

How ER works

ER runs on edge nodes of Alibaba Cloud CDN and provides a standalone JavaScript runtime environment for you to deploy JavaScript code.

How ER works


The integrated JavaScript runtime environment allows you to manage comprehensive logic of processing requests. You can also use ER to enable edge nodes to asynchronously retrieve content from the origin server over HTTP and HTTPS. The following table lists a variety of scenarios that ER supports.
Scenario Feature
Authentication Custom CDN authentication and asynchronous authentication
Originless responses Static content delivery
Network security
  • Anti-crawler protection
  • Web Application Firewall (WAF) deployed on edge nodes
  • Automatic logs on edge nodes
  • Records of back-to-origin time
  • A/B testing
  • Webhook configuration in GitLab, GitHub, and Jenkins
  • Programming of instant messaging robots, such as Slack robots.
API Gateway
  • Edge GraphQL
  • Edge gateway
    • Throttling
    • API parameter validation
  • Content preloaded to edge nodes
  • Content cached on edge nodes
  • Edge requests redirected to multiple origin servers
    • Merged content from multiple origin servers
    • Optimized redirection with the shortest latency
  • Retrieval of content from different origin servers, depending on custom back-to-origin algorithms
Web applications and applets
  • Edge rendering
    • Markdown rendering
    • Edge Side Includes (ESI) rendering
    • Nunjucks rendering
  • Edge server-side rendering (SSR)
    • Vue.js
    • React.js
  • Latency optimization and content preload
  • Diverse services on edge nodes, such as QR code generation
Beacon Capture and analysis of edge tracking data

Use ER

ER is only available in invitational preview. To enable the ER feature, you must submit a ticket and request permissions. After you are granted ER permissions, you can use the EdgeRoutine CLI tool to deploy custom JavaScript code on edge nodes of Alibaba Cloud CDN.