Elastic Compute Service (ECS) functions as an important infrastructure for services. However, the deployment of ECS instances is limited to regions or countries. To address this issue, you can use ECS together with Dynamic Content Delivery Network (DCDN). DCDN and ECS help you deploy cost-effective, high-performance, and highly reliable networks and services. DCDN can accelerate the delivery of static and dynamic content on ECS instances, and provide computing and security services on points of presence (POPs). You can deploy services across the world with a minimum number of ECS instances.
Background information
- DCDN
DCDN is a virtual network that consists of POPs. It accelerates content delivery and provides computing capabilities that accelerate the delivery of dynamic content or both static and dynamic content. DCDN supports a wide array of protocols, including HTTP, HTTPS, Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and WebSocket. DCDN has more than 3,200 POPs deployed across the world to provide protection and computing capabilities. For more information, see DCDN.
- ECS
ECS is a scalable cloud service. It helps you minimize IT expenses and improve operation and maintenance (O&M) efficiency. This allows you to focus on the innovation of core services. For more information, see Elastic Compute Service.
Scenarios
Online education | Gaming | Retail | Finance | Media | Social network |
---|---|---|---|---|---|
|
|
|
|
|
|
Benefits
- Acceleration of static and dynamic content
Traditional CDN services can accelerate only static content delivery. DCDN can accelerate both static and dynamic content.
- Compatibility with multiple protocols
DCDN supports a wide array of protocols, including HTTP, HTTPS, WebSocket, TCP, and UDP. This allows you to accelerate content delivery at different layers.
- Cost-effectiveness
DCDN minimizes expenses on ECS bandwidth, computing resources, and connections because content can be cached on distributed DCDN nodes.
- High availability
DCDN has more than 3,200 POPs deployed across the world. These POPs support a wide array of features including protection and IPv6, which allow you to keep your services available and meet different business requirements.
- Edge computing
DCDN allows you to customize features such as A/B testing, URI rewrite, and rate limiting on edge nodes.
Architecture

- Accelerate the delivery of static content
Static content is cached on DCDN nodes. Users can retrieve static content from the nearest nodes.
- Accelerate the delivery of dynamic content
If content requested by some requests, such as POST requests, is not cached on DCDN nodes, DCDN nodes redirect the requests to the origin server to retrieve content based on an intelligent scheduling system. The system selects an optimal route for redirection.
- Accelerate the delivery of both dynamic and static content
DCDN intelligently identifies static and dynamic content. Static content is cached on DCDN nodes. Users can directly retrieve the cached static content from the nearest DCDN nodes. Requests for dynamic content are redirected to the origin server through an optimal route selected by the intelligent scheduling system.
Configuration procedure
Prerequisites
- An ECS instance is created and applications are deployed on it. The ECS instance is assigned a public IP address. If you have configured an SLB instance for the ECS instance, make sure that the SLB instance is assigned a public IP address and can provide services to external systems.
- A domain name with a valid Internet Content Provider (ICP) number is prepared. If the domain name does not have an ICP number, you can apply for one through Alibaba Cloud ICP Filing System.
- DCDN is activated. For more information, see Activate DCDN.
Procedure

Basic settings (required)
Step 1: Add a domain name to DCDN
- Log on to the DCDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, click Add Domain Name.
- On the Add Domain Name page, configure the parameters that are described in the following table.
Parameter Description Domain Name to Accelerate - Domain name type: Specify a domain name such as
example.aliyundoc.com
or a wildcard domain name such as*.aliyundoc.com
. - Domain name format: The domain name must be in lowercase letters. Chinese characters are not supported. Important
If the domain name contains Chinese characters such as 阿里云.网址, you must apply for an ICP number for the domain name in Chinese characters, and use the tool Punycode to convert the domain name to its ASCII equivalent, such as xn--fiq****.xn--eq****. Then, you can specify it as the domain name to be accelerated.
- Requirements for wildcard domain names: For more information, see Does DCDN support wildcard domain names? . Important
- The wildcard domain name that you specify and the domain names that match the wildcard domain name must belong to the same Alibaba Cloud account. Otherwise, an error message appears when you add domain names. If you need technical support from Alibaba Cloud, submit a ticket
- If a wildcard domain name is not added to DCDN, you can add the domain names that match the wildcard domain name to DCDN by using different Alibaba Cloud accounts.
- You cannot add domain names that have been added to other Alibaba Cloud services.
If the system prompts that the domain name is added to other Alibaba Cloud services such as ApsaraVideo VOD and Alibaba Cloud CDN, submit a ticket
- Each Alibaba Cloud account can add up to 50 domain names to DCDN.
If the average daily peak bandwidth values of your domain names exceed 50 Mbit/s, you can submit a ticket to add more domain names to DCDN. Make sure that the increase of domain names does not incur business risks.
- The content that is delivered from the domain name must abide by the relevant laws and regulations, and comply with the Terms of Service for DCDN. For more information, see Before you start.
Resource Group Select the default resource group or a custom resource group. For more information about how to create a resource group, see Create a resource group. Business Type Select DCDN. Acceleration Region Chinese Mainland Only is selected in this example. If you select Chinese Mainland Only or Global, you must apply for an ICP number for the domain name. We recommend that you perform ICP filing by using Alibaba Cloud ICP Filing System. The Ministry of Industry and Information Technology (MIIT) may not immediately update the data in the database after you submit domain name information. We recommend that you configure the domain name 8 hours after you submit the domain name information. Note The pricing varies based on the acceleration region. Select an acceleration region based on your business requirements. For more information about billing, see DCDN pricing. - Domain name type: Specify a domain name such as
- On the Add Domain Name page, click Add Origin Server and configure the parameters that are described in the following table.
Parameter Description Type Select the type of the origin server and enter the address of the origin server.
- OSS Domain
- If you use an Object Storage Service (OSS) bucket as the origin server, you can enter the public domain name of the OSS bucket, such as,
***.oss-cn-hangzhou.aliyundoc.com
. Internal domain names of OSS buckets are not supported. - You can obtain the public domain name of an OSS bucket in the OSS console. You can also select the domain name of an OSS bucket that belongs to the current Alibaba Cloud account from the Domain Name drop-down list.
- If you use an Object Storage Service (OSS) bucket as the origin server, you can enter the public domain name of the OSS bucket, such as,
- IP
You can enter public IP addresses of one or more servers. Public IP addresses of Alibaba Cloud Elastic Compute Service (ECS) instances do not need to be reviewed. Private IP addresses are not supported.
- Site DomainYou can enter the domain name of an origin server. To configure multiple domain names, repeat the preceding steps.Note
- The origin domain name must be different from the accelerated domain name. If the origin domain name is the same as the accelerated domain name, a DNS resolution loop occurs, and requests cannot be redirected to the origin server.
- The domain name must be in lowercase letters.
- If the domain name contains Chinese characters such as 阿里云.网址, you must apply for an ICP number for the domain name in Chinese characters, and use the tool Punycode to convert the domain name to its ASCII equivalent, such as xn--fiq****.xn--eq****. Then, you can specify it as the domain name to be accelerated.
Priority You can configure priorities to specify primary and secondary origin servers. The primary origin server has a higher priority than the secondary origin server. DCDN preferentially redirects requests to the primary origin server.
For example, if you specify Origin Server A as the primary origin server and specify Origin Server B as the secondary origin server, requests are preferentially redirected to Origin Server A. When Origin Server A is down, requests are redirected to Origin Server B until Origin Server A works as expected again.
Weight If origin servers have the same priority, DCDN redirects requests to the origin servers based on the weights of the origin servers. This implements load balancing between the origin servers. You can specify a weight based on your business requirements.- The weight of an origin server ranges from 0 to 100. An origin server that has a higher weight receives more requests.
- The default value is 10.
For example, you specify Origin Server A and Origin Server B as primary origin servers. If the weight of Origin Server A is 80 and the weight of Origin Server B is 20, DCDN redirects 80% of requests to Origin Server A and 20% of requests to Origin Server B.
Port Select a port based on the protocol that is supported by the origin server.- Port 80: Requests are redirected to the origin server over port 80.
- Port 443: Requests are redirected to the origin server over port 443. Make sure that the origin server supports HTTPS.
Note Before you can specify a custom port, you must set Static Origin Protocol Policy and Dynamic Origin Protocol Policy to HTTP after you add a domain name. For more information, see Configure the static origin protocol policy and Configure back-to-origin requests to retrieve dynamic content. - OSS Domain
- After you configure an origin server, click Next.
- Wait for manual verification.
After the domain name passes the verification, the status of the domain name changes to Enabled. In this case, the domain name is added to DCDN.
Step 2: Run tests (optional)
- Obtain the CNAME of the domain name.
- Obtain the IP address of the CNAME. Note The following IP address is an example returned by running the ping command and is for reference only. To obtain the actual IP address of your CNAME, run the ping command to ping your CNAME.
- Windows: To obtain the IP address of your CNAME, open the command-line interface and run the ping CNAME command
- macOS: To obtain the IP address of your CNAME, open the command-line interface and run the dig CNAME command
- Add the IP address and domain name to the hosts file of the on-premises machine.
You must add the IP address obtained from Step 2 and the domain name to the hosts file of the on-premises machine. Make sure that you add the IP address before the domain name.
In this example, the domain name is example.com, the CNAME is example.com.w.kunlunsl.com, and the IP address of the CNAME is 192.168.0.1.
- The path of the hosts file in Windows is C:\Windows\System32\drivers\etc\hosts. The following figure is an example.
- The path of the hosts file in macOS is Finder > Go > Go to the folder > /etc/hosts. The following figure is an example.
- The path of the hosts file in Windows is C:\Windows\System32\drivers\etc\hosts. The following figure is an example.
- Test whether the domain name is accessible. After you add the IP address and domain name to the hosts file, you can open the browser and enter the domain name in the address bar to test the connectivity. You can view the test result by using the developer tool of the browser.
- If the IP address in the Remote Address field is the same as the one that you add to the hosts file, the configuration is valid. You can configure the CNAME on the DNS service provider side.
- If the IP address in the Remote Address field is different from the one that you add to the hosts file, the configuration is invalid. Make sure that you add the IP address of the CNAME to the hosts file.
After you access the domain name, you can also test other features by using the on-premises machine.
- If the IP address in the Remote Address field is the same as the one that you add to the hosts file, the configuration is valid. You can configure the CNAME on the DNS service provider side.
Step 3: Add a CNAME record
You must add a CNAME record for the domain name at your DNS service provider. Alibaba Cloud DNS is used in this example to demonstrate how to add a CNAME record. The procedure for adding a CNAME record at a third-party DNS service provider is similar.
- Log on to the DCDN console, navigate to the Domain Names page, and then copy the CNAME of the domain name.
- Add a CNAME record.
- Method 1: Quick verification in the DCDN console
- Log on to the DCDN console and navigate to the Domain Names page.
- Select the domain name and move the pointer over the CNAME Status column. The CNAME Configuration Guide tooltip appears.
- Click Open Configuration Guide and then click Search.
- Method 2: Run the ping command to ping the domain name
- Open Command Prompt in Windows.
- Run the ping command to ping the domain name. If the CNAME in the output matches the CNAME that is assigned to the domain name in the DCDN console, the DCDN service is enabled for the domain name.
Advanced settings (optional)
Scenario | Description | Implementation | References |
---|---|---|---|
Accelerate the delivery of both static and dynamic content | After you enable acceleration for dynamic content delivery, DCDN automatically identifies dynamic content and static content. Static content such as images, Sitecore JavaScript SDK (JSS) code, and CSS code is cached on DCDN nodes so that users can retrieve content from the nearest DCDN nodes. For requests that request dynamic content, such as POST requests, DCDN selects an optimal route to redirect the requests to the origin server to retrieve the requested content. | Enable acceleration for dynamic content delivery | In the console: Navigate to the page. |
Accelerate content delivery in more regions | If the majority of your users and the ECS instances are located in the Chinese mainland, you can set the accelerated region to Chinese Mainland Only. As your business develops, your users may be located around the world. If requests from your users are all sent to DCDN nodes that are deployed in the Chinese mainland, content delivery can be slow. In this case, you can change the accelerated region to Global. Requests can be scheduled to nodes that are nearest to the users. | Change the accelerated region | Change the accelerated region |
Balance loads on origin servers | DCDN can redirect requests to primary and secondary origin servers based on the round-robin algorithm to balance loads on the origin servers. In addition, DCDN can automatically switch to another origin server when an error occurs on one origin server. This feature is applicable to the following scenarios:
| Specify primary and secondary origin servers | Configure an origin server |
Meet requirements such as DNS settings, latency, and availability | You can enable the IPv6 feature to meet business requirements, including DNS settings, latency, and availability. | Enable IPv6 | Configure IPv6 |
For more information about DCDN, see What is DCDN?