All Products
Search
Document Center

CDN:What is CDN?

Last Updated:Dec 09, 2024

Alibaba Cloud CDN is a global network of points of presence (POPs) that are distributed across the globe. CDN serves to reduce origin traffic. This in turn prevents network congestion and ensures that content is delivered with minimal latency across regions in various use cases.

CDN global network is made up of more than 3,200 strategically located POPs. Among these POPs, more than 2,300 are distributed across 31 provincial regions in the Chinese mainland and more than 900 are distributed across over 70 countries and regions, including Hong Kong (China), Macao (China), and Taiwan (China). The total bandwidth capacity of CDN can reach up to 180 Tbit/s. For more information about the distribution of main POPs, see POP distribution.

CDN caches resources from your origin servers on POPs that are located across the globe. When customers access your resources, the resources are served from the nearest POP instead of the origin server. This helps prevent lengthy origin requests and reduce loads on origin servers, delivering a better experience to your customers and reducing origin fetch costs. CDN also provides IPv6 support on specific POPs.

CDN is a simple and efficient method to deliver content to your customers. As a content provider, you can serve your content by using CDN with just a few clicks in the console. You no longer have to worry about setting up complex configurations or modifying your code to be compatible with your content delivery provider. After you add your domain name to CDN, your content is automatically cached to the global content delivery network. For more information about how to activate and use CDN, see For beginners.

Benefits

You can use CDN to separately accelerate the delivery of static content. CDN provides the following benefits:

  • Globally distributed POPs: CDN redirects requests to the nearest POPs that belong to the same Internet service provider (ISP) as the clients, which eliminates network latency when traffic is passed between different ISPs.

  • Scalable resources: CDN provides more than 3,200 globally distributed POPs to ensure resource scalability and service availability.

  • Intelligent routing: CDN monitors the health status of POPs in real time, and redirects requests to optimal POPs selected by the routing system based on client locations and ISPs.

  • Intelligent connections: CDN uses optimization strategies such as protocol optimization and connection optimization to reduce network latency and accelerate content delivery, especially over networks with limited connectivity.

  • Intelligent caching: CDN caches popular content across its global network, improving the cache hit ratio on POPs that are closest to clients.

  • Lower IT costs: Aside from content delivery capabilities, POPs also provide computing, bandwidth, and networking capabilities, which you can make use of to reduce investment in IT hardware.

  • High bandwidth capacity: CDN provides up to 180 Tbit/s of networking capacity.

  • Standardized API: CDN provides a comprehensive suite of user-friendly API operations.

For more information, see Competitive advantages of CDN.

Architecture

The following figure shows the architecture of CDN. CDN consists of a routing system, a route quality system, a caching system, and a support system.cdn架构

  • Link quality system

    The route quality system monitors the loads and health status of POPs and routes in real time. This information is shared with the routing system, which uses this information to select optimal routes for requests. The routing system also takes additional information included in the origin IP address, such as the ISP and region of the requests, into account when selecting the optimal route.

  • Routing system

    The routing system provides a policy center and supports Domain Name System (DNS) resolution, HTTPDNS, and 302 redirection. When a client sends a request, the request is resolved by DNS resolution and subsequently processed by the routing system.

  • Caching system

    The caching system redirects requests to POPs based on the access points where the requests originate. If the requested resource is already cached on the POPs, the resource is returned to the client. Otherwise, the request is redirected to the origin server. The retrieved resource is then served to the requester and cached on the POPs. Subsequent requests for the resources are directly served from the POPs. CDN uses intelligent object algorithms to cache content based on popularity in a multi-level cache. This mechanism allows CDN to reduce the amount of origin bandwidth resources, and improve user experience.

  • Support system

    The support system supports Tianyan (an internal health monitoring system), data intelligence, and configuration management. The support system can monitor resources, analyze data, and manage configurations.

    • Resource monitoring: Tianyan can monitor the status of services that are running in the caching system. For example, Tianyan can monitor the number of queries per second (QPS), bandwidth, and HTTP status codes for a domain name that is accelerated by CDN.

    • Data analytics: You can analyze data, such as the top N most frequently requested URLs, page views (PVs), and unique visitors (UVs) for a domain name that is accelerated by CDN.

    • Configuration management: You can create and manage cache expiration rules to improve the efficiency of the caching system. For example, you can create a cache expiration rule for a specified type of file or enable parameter filtering.

How it works

In this example, the domain name that is accelerated by CDN is www.aliyundoc.com. The following figure shows how CDN handles an HTTP request from a client in Beijing.原理

  1. When the client in Beijing sends a request to retrieve resources from www.aliyundoc.com, a domain name resolution request is sent to the local DNS server (LDNS) to retrieve the IP address of www.aliyundoc.com.

  2. The LDNS checks whether the cache contains the IP address that corresponds to www.aliyundoc.com. If yes, the LDNS returns the IP address to the client. If not, the LDNS queries the DNS records of www.aliyundoc.com from the authorized DNS server of the website.

  3. After the authorized DNS server of the website resolves www.aliyundoc.com, the CNAME www.aliyundoc.com.example.com of the domain name is returned.

  4. The LDNS sends a request to the DNS routing system of CDN to retrieve the DNS records of www.aliyundoc.com.example.com. Then, the routing system selects an optimal POP and returns the POP IP address to the LDNS.

  5. The LDNS receives the IP address that is returned by the routing system.

  6. The LDNS returns the IP address to the client.

  7. The client initiates a request to the received IP address.

    • If the requested resource is already cached on the POP, the resource is directly served to the client, as shown in Step 8.

    • If the requested resource is not cached on the POP or has expired, the request is redirected to the origin server. The retrieved resource is served to the client and cached on POPs based on the cache expiration rules, as shown in Step 8. For more information about how to configure a cache expiration rule, see Create a cache rule for resources.

Differences between CDN, DCDN, and ESA

Item

CDN

DCDN (Dynamic Content Delivery Network)

ESA (Edge Security Acceleration)

Scenario

Game updates, app updates for mobile phones, on-demand videos including long and short videos, and infographic websites.

Online shops, online payments, online chatting, online education, online multiplayer games, and financial management.

Includes but is not limited to gaming, e-commerce, finance, and retailing industries.

Acceleration region

  • Chinese mainland only

  • Global

  • Global (excluding the Chinese mainland)

  • Chinese mainland only

  • Global

  • Global (excluding the Chinese mainland)

  • Chinese mainland only

  • Global

  • Global (excluding the Chinese mainland)

Acceleration method

Accelerates the delivery of static resources and redirects requests for dynamic resources to origin servers. CDN is suitable for scenarios that require high bandwidth and process a large amount of network traffic.

  • Delivers your content by using a global network made up of more than 3,200 strategically located POPs. Your data is cached on the network based on custom cache rules.

  • Balances loads on origin servers, distributes requests to origin servers based on weights, reduces origin requests, and reduces costs on origin servers.

  • Caches static content such as images and videos on POPs to deliver content from the nearest POPs to clients.

Accelerates the delivery of dynamic content, or both dynamic and static resources.

  • Accelerates the delivery of dynamic content

    If the requested content is not cached on POPs, the request is redirected to the origin server. The request is routed by the intelligent routing system, which provides the optimal route for the content to be retrieved.

  • Accelerates the delivery of both dynamic content and static content

    Alibaba Cloud DCDN intelligently classifies and accelerates static content and dynamic content. Static content is cached on POPs, and can be directly served to customers from the POPs. Requests for dynamic content are redirected to the origin server by using the optimal route that is selected by the intelligent routing system.

Accelerates the delivery of dynamic and static resources. ESA delivers more advanced features and capabilities.

  • Cache-based acceleration

    Supports scheduled prefetch, cache reserve, and cache analytics. This increases the cache hit ratio and reduce the consumption of origin traffic.

  • DNS

    With Anycast DNS and POPs around the world, the average DNS resolution takes less than 30 ms.

  • TCP/UDP proxy

    Supports acceleration in complex scenarios with multiple ports and protocols.

Supported protocol

  • Application layer: HTTP, HTTPS, and Quick UDP Internet Connections (QUIC)

  • Network layer: IPv4 and IPv6

  • Application layer: HTTP, HTTPS, and WebSocket

  • Transport layer: TCP and UDP

  • Network layer: IPv4 and IPv6

  • Application layer: HTTP, HTTPS, and WebSocket

  • Transport layer: TCP and UDP

  • Network layer: IPv4 and IPv6

Scheduling mode

  • DNS resolution

  • HTTPDNS

  • 302 redirection

  • DNS resolution

  • HTTPDNS

  • 302 redirection

  • DNS resolution with better performance and security

  • HTTPDNS

  • 302 redirection

Edge computing

  • Supports Edge Script. You can use scripts to customize CDN features on POPs.

  • Supports image editing.

  • Supports Edge Routine (ER). You can use ER to deploy functions on POPs. For example, you can perform A/B testing and run prefetch tasks.

  • Supports Edge Script. You can use scripts to customize CDN features on POPs.

  • Supports image editing.

  • Edge Routine (ER)

    Edge Routine enables you to deploy JavaScript code across POPs. This way, user requests can be responded to and processed by the POP that is closest to users.

  • Edge KV

    Edge KV is the edge storage service based on key-value pairs. You can use Edge KV together with ER to deploy lightweight Blockchain as a Service (BaaS) services and API gateway services.

  • Edge Container

    Edge Container provides elastic, easy-to-maintain computing resources based on containerized applications. You do not need to purchase server resources or worry about application scaling and O&M.

Security policies

  • Referer-based hotlink protection

  • URL signing

  • IP blacklist/whitelist

  • Basic WAF protection

  • Anti-DDoS protection

  • Basic bot protection

  • WAF supports custom protection rules.

  • Enterprise plans have up to Tbit/s of DDoS mitigation capabilities.

  • You can integrate Anti-Bot SDK for JavaScript, Android, or iOS for bot management.

  • Supports AI-driven protection.

  • Supports origin protection to shield your origin against unauthorized access from external IP addresses.

Log analysis

  • Standard logs

  • Real-time log delivery

  • Standard logs

  • Real-time log delivery

  • Traffic analysis

  • Standard logs

  • Real-time log delivery

  • Instant logs

Note
  • Static content refers to files that can be delivered without modifications or processing. The server returns the same file for different requests. Static content includes images, videos, HTML files, CSS files, JavaScript files, software installation packages, Android Package (APK) files, and compressed package files.

  • Dynamic content refers to content that is delivered on a per-request basis. The server returns different contents for different requests. Dynamic content includes ASP, JSP, PHP, Perl, and CGI files, API requests, and database interactive requests on websites.

For more information about static content and dynamic content, see What are static content and dynamic content?

Billing rules

CDN generates bills for basic services and value-added services.

  • Billing rules of basic services: The pay-by-data-transfer and pay-by-peak-bandwidth metering methods are supported. The default metering method is pay-by-data-transfer. For more information, see Billing of basic services.

  • Billing rules of value-added services: The billable items include HTTPS requests for static content, QUIC requests for static content, and real-time log entries. For more information, see Billing of value-added services.

For more information about pricing, visit the CDN pricing page.

Before you activate CDN, we recommend that you get familiar with the billing rules of CDN. For more information, see Activate CDN.

Management tools

You can use your Alibaba Cloud account to manage CDN anywhere by using the following methods:

  • CDN console

    The CDN console is an easy-to-use web console that supports interactive operations. For more information, see User Guide.

  • CDN API

    The CDN API is a remote procedure call (RPC) API that supports GET and POST requests. For more information, see List of operations by function.

Related services

The following table describes the services that are related to CDN to help you understand the positioning of CDN and how it can be used in combination with other Alibaba Cloud services.

Alibaba Cloud service

Description

DCDN

DCDN separately accelerates dynamic content and static content while balancing performance and security capabilities.

OSS

If you use an Object Storage Service (OSS) bucket as an origin server, you can use CDN to accelerate content delivery and reduce Internet data transfer fees.

ApsaraVideo Live

You can use CDN together with ApsaraVideo Live to achieve media feed storage, video segmentation and transcoding, access authentication, and content delivery acceleration.

ApsaraVideo VOD

You can use CDN together with ApsaraVideo VOD to reduce the buffer time and improve playback smoothness.

Alibaba Cloud DNS

You can use Alibaba Cloud DNS that is highly available and stable to ensure smooth access to resources.

ECS

You can use CDN together with Elastic Compute Service (ECS) to improve website availability, protect information about origin servers, and minimize bandwidth usage costs.

SLB

You can specify the IP address of a Server Load Balancer (SLB) instance as the origin address to distribute traffic across multiple servers during the origin fetch process.

Best practices