How to get started with Alibaba Cloud CDN?

How to get started with Alibaba Cloud CDN?

A content delivery network (CDN) is a network of geographically dispersed servers that enables faster web performance by locating copies of web content closer to end-users or facilitating the delivery of dynamic content (e.g., live video feeds)

You can use a content delivery network (CDN) to deliver content to users from the nodes that are nearest to them, accelerating the response to user requests and increasing the response rate. CDN also resolves the delivery latency problem that is usually caused by distribution, bandwidth, and server performance issues. CDN has been applied in multiple scenarios, including site acceleration, on-demand streaming, and live streaming.

Benefits of Content Delivery Network

Stability
Provides more than 2,800 nodes covering six continents and 120 Tbps of bandwidth, and supports major ISPs worldwide

High speed
Supports a response time of less than several milliseconds, intelligent connection selection, and a backbone network with 10-GE NICs and SSD storage to ensure the smoothness of content delivery.

Scalability
Supports multiple native features, including horizontal service scaling, customizable console, multiple APIs, and simple architecture scaling.

Cost-effectiveness
Supports Pay-As-You-Go and other billing methods to achieve cost-effective and high-quality content delivery.

Features of Content Delivery Network

1. HTTPS-secured acceleration

Provides a reliable enterprise-level acceleration service over HTTPS, to prevent hijacking, tampering, and leakage.

a. End-to-end content delivery acceleration
Uses HTTPS to secure client access, node interconnectivity, and origin fetch requests. To achieve secured acceleration, you only need to enable secured acceleration and upload the domain certificate or private key. You can also view, enable, disable, and edit domain certificates.

b. Force HTTPS redirection
Domain name-based site acceleration works with HTTPS-secured acceleration to support force redirection of HTTP requests to HTTPS.

 

2. High-performance and efficient caching model

Supports intelligent popularity calculation and hierarchical caching of frequently requested resources. This enables you to precisely accelerate the resources that the users have requested.

a.High-performance caching

Supports load balancing among multiple vCPUs, efficient memory usage, and management, and maximized input and output operations per second (IOPS) and throughput of SSD storage.

b.Ultra read and write capabilities

All nodes are configured with SSDs to support high-speed reading and writing to greatly reduce response time and increase availability.

c.User-defined cache expiration time

User-defined expiration rules for cached resources. This feature allows you to apply the rules to a /test/… path or a .html file.

d.Request header customization

Provides multiple parameters for customizing the header of HTTP requests.

 

3.Access control

Supports multiple anti-leech features based on HTTP referrer, user agent (UA) headers, IP addresses, and URL authentication verification.

a.Access control based on HTTP referrer

Provides a referer whitelist and blacklist to identify and filter visitors and limit access to resources.

b.Authentication

Supports an advanced anti-leech feature. This feature allows you to use authentication keys to encrypt URLs and protect resources on user origin sites.

c.IP blacklist

Blacklisted IP addresses are not allowed to access accelerated domains

4.Performance optimization

Supports web page optimization and smart compression to reduce the overhead of content delivery and accelerate the delivery.

a.Web page optimization

Removes redundant content on web pages (such as HTML pages), comments, and redundant spaces in JavaScript and CSS scripts.

b.Smart compression

Compresses static content files to efficiently reduce the size of content to be delivered.

c.Parameter filtering

Origin fetching removes parameters following the question mark (?) in URLs to increase the hit rate of the cache and improve the efficiency of content delivery.

d.Performance optimization
Supports web page optimization and smart compression to reduce the overhead of content delivery and accelerate the delivery.

e.Web page optimization

Removes redundant content on web pages (such as HTML pages), comments, and redundant spaces in JavaScript and CSS scripts.

f.Smart compression

Compresses static content files to efficiently reduce the size of content to be delivered.

g.Parameter filtering

Origin fetching removes parameters following the question mark (?) in URLs to increase the hit rate of the cache and improve the efficiency of content delivery.

 

4.Statistics and analysis

Supports comprehensive data statistics, multi-dimensional analysis, and user profiling to boost business development.

 

5.Log management

Provides a customized log service and storage persistence service for the ease of log downloading and analysis.

 

6.Image moderation

Supports smart recognition of illicit content based on deep learning to minimize the risk of user violations.

 

The following figure shows how to get started with Alibaba Cloud CDN.

The following table illustrates the steps for a quick start.

1. Activate the CDN service

Before you use the features provided by Alibaba Cloud CDN, you must activate the Alibaba Cloud CDN service.

2. Add a domain

If you need to use Alibaba Cloud CDN to accelerate the delivery of content on a specific website, you must specify the website as the origin, and create an accelerated domain for the origin. By using the accelerated domain, Alibaba Cloud CDN caches the content from the origin to a CDN node to accelerate content delivery.

3.Configure a canonical name (CNAME) record

Configure a CNAME record on Alibaba Cloud DNS
After you create the accelerated domain, the Alibaba Cloud CDN team will assign the corresponding CNAME to the accelerated domain. To enable the CDN service, you must add a CNAME record to the DNS records of the accelerated domain to map the accelerated domain to the CNAME. In this way, requests for the accelerated domain can be sent to a CDN node. You can configure a CNAME record with multiple Domain Name System (DNS) hosting providers. Select a DNS hosting provider as needed.

4. Stop the CDN service

If you no longer need the Alibaba Cloud CDN service, you can delete the specified accelerated domain name in the Alibaba Cloud CDN console. After the accelerated domain name is deleted, no charges will be incurred.

Activate the CDN service

This topic describes how to activate CDN. You can use CDN only after the service is activated.

Prerequisites
Before you perform the tasks described in this document, make sure that you have completed account registration and real-name authentication with Alibaba Cloud.

Procedure
1.Log on to the Alibaba Cloud CDN platform.
2.Click Buy Now.
3. On the Enable Service page, select a billing method as needed.

For more information about CDN billing methods, see CDN pricing.

4. Select I agree with Alibaba Cloud CDN Agreement of Service and click Enable Now.
5. On the Confirm Order page, click Console to go to the CDN console.

API operations
You can call API operations listed in the following table to manage the CDN service.

Operation Description
OpenCdnService Activates the CDN service.
ModifyCdnService Changes the billing method of the CDN service.
DescribeCdnService Queries the status of the CDN service.
DescribeCdnUserResourcePackage Queries the current data transfer package.
DescribeCdnUserQuota Queries the limit of resources for your account and the resource usage information.

 

Verify the ownership of a domain name

When you add a new domain name to Alibaba Cloud Content Delivery Network (CDN), Alibaba Cloud CDN verifies the ownership of the domain name. If you pass the verification process, Alibaba Cloud CDN identifies you as the owner of the domain name. If you add the domain name to Alibaba Cloud CDN again or add its subdomain names to Alibaba Cloud CDN, you do not need to complete the ownership verification process. You can use a Domain Name System (DNS) record or upload the verification file to prove the ownership. In the following example, a.com is used to demonstrate how to prove the ownership of a domain name.

Method 1: Use a DNS record to prove the ownership

When you add a new domain name to Alibaba Cloud CDN, you can add a DNS record to prove that you own the domain name.

Obtain the record type, hostname, and record value.
Log on to the Alibaba Cloud CDN console.
In the left-side navigation pane, choose Domain Names > Add Domain Name. The first time that you add a domain name to Alibaba Cloud CDN, follow the instructions on the page to add a TXT record.

 

Add a DNS record.
1.Log on to the Alibaba Cloud DNS console. In this example, Alibaba Cloud DNS is used to add a DNS record. You can add a DNS record through other service providers such as DNSPod and Xinnet in a similar way.
2. On the Manage DNS page, find the domain name a.com and click Configure in the Actions column.
3. Click Add Record. Enter the record type, hostname, and record value that you have obtained in Step 1.
4. Complete the verification process.
5.Log on to the Alibaba Cloud CDN console.
6. Click Verify to complete the verification process.

 

Method 2: Upload the verification file to prove the ownership
When you add a new domain name to Alibaba Cloud CDN, you can upload the verification file to prove that you own the domain name.

1. Log on to the Alibaba Cloud CDN console.
2. In the left-side navigation pane, choose Domain Names > Add Domain Name > Method 2: Verification File.
Download the verification.html verification file

3. Upload the verification file to the root directory of the origin server of your domain name. The origin server can be an Elastic Compute Service (ECS) instance, Object Storage Service (OSS) bucket, Cloud Virtual Machine (CVM) instance, Container-Optimized OS (COS) instance, or Elastic Compute Cloud (EC2) instance.

Alibaba Cloud CDN will visit the origin server at http://a.com/verification.html to obtain the verification file and determine whether you have uploaded the verification file as required. Make sure that the file is accessible.

5. Click Verify to complete the verification process.

Ashok kuikel

Hi, I am Ashok Kuikel, WordPress Developer for WordPress Community. While Cloud Computing Associate and Alibaba MVP and ACA for Cloud Professional. You can follow me on Social Media, GitHub, and via my Blog Channels.

Leave a Reply

Your email address will not be published. Required fields are marked *