Updated on 2026-04-24 GMT+08:00

Function Types

Edge functions: To create an edge function, use the FunctionGraph template designed for CDN. When a client request triggers an edge function rule, CDN PoPs automatically execute the function.
  • Edge functions can be used in all phases.

Cloud functions: A cloud function does not require a template. When a client request triggers the cloud function rule, CDN calls a FunctionGraph API to execute the function.

  • Cloud functions are only supported in the Before origin pull phase.

Worker functions: To create a worker function, use the FunctionGraph template designed for CDN. When a client request triggers the worker function rule, CDN calls a FunctionGraph API to execute the function.

  • Worker functions are only supported in the Client request received phase.