All Products
Document Center

Enable CDN acceleration for Function Compute

Last Updated: Mar 22, 2020

Function Compute supports Content Delivery Network (CDN) for web applications. When CDN is enabled for Function Compute, applications deployed in Function Compute are configured as origins and their contents are distributed to edge nodes. The scheduling system of CDN distributes requests to the optimal node to ensure that terminal users experience minimal latency.

The CDN back-to-origin feature of Function Compute consumes public network traffic. For more information about the charged fees, see Billing methods.


Before you use CDN, you must understand the following concepts:

  • Accelerated domain: a domain that uses CDN to accelerate content distribution.
  • Site domain: the domain of your application.

When you use Function Compute as the backend application of CDN, you must bind a custom domain to the accelerated domain as the site domain through the Function Compute console.


Enable CDN acceleration

You can enable CDN acceleration in the following ways:

Method 1: Enable CDN acceleration in the Function Compute console.

  1. Log on to the Function Compute console.
  2. Click Custom Domain.
  3. Bind custom domains and turn on CDN Acceleration.
    • Configure the custom domain as the site domain and the accelerated domain as the domain that uses CDN to accelerate.
    • You can configure a custom domain for multiple accelerated domains.


Method 2: Enable CDN acceleration in the CDN console.

  1. Log on to the CDN console.
  2. Click Domain Names and click Add Domain Name.
  3. Enter the accelerated domain in the Domain Name field and select the custom domain that you configured in the Function Compute console as the origin.
  4. The domain is configured.