CDN usage scenarios and common problems | Learning notes

1、 CDN usage scenarios

1. Typical application scenarios for CDN include:

Static acceleration, live streaming acceleration, mobile application acceleration, full site acceleration, security acceleration, and large file acceleration

2. Through the study of this chapter, it is necessary to master the following questions:

(1) How do static files achieve acceleration in static acceleration?

(2) How to achieve a user's live streaming access experience when building a live streaming platform? Ensure that users do not feel stuck or delayed during live streaming.

(3) The most typical mobile application acceleration. Nowadays, daily life is closely related to mobile apps, so how can we ensure that mobile users maintain a good experience while moving?

(4) Full station acceleration and safe acceleration. Full site acceleration and security acceleration already exist as two independent products in Alibaba Cloud.

(5) Need to understand the acceleration of large files.

The purpose of the acceleration scenario is actually to improve the speed of user access or the success rate of user access to the site through CDN acceleration.

(6) How to achieve dynamic and static separation? For example, in a website, there are both static and dynamic pages. Dynamic pages may need to be updated in real-time, and may not need to be updated in the short term. Can we achieve separation and acceleration of dynamic and static pages? How to achieve fast downloading of large files? How should we achieve this through CDN?

(7) When using CDN, you may face various external attacks.

How to effectively prevent these external attacks? And ensure the safety of CDN during the acceleration process. CDN is not just a purely caching function, but actually refers to acceleration or security. How to achieve safe acceleration?

2、 Static acceleration

Set static file path → Set static file type → Set static file URL

Accelerated distribution of a large amount of static resources in a site or application. It is recommended to separate the dynamic and static content of the site, and use Alibaba Cloud CDN acceleration for static content. Dynamic content can be accelerated across the entire site, while static resources such as various types of images, CSS, and JavaScript small files are recommended to be used in conjunction with object storage OSS.

Static acceleration is the most common acceleration method in CDN. Look at the picture:

1. Request static data

When a user visits a site, if they are requesting static data, be aware that the CDN is in effect and will go to the source site to request the data they want to access, and then retrieve this data. You can put this data on OSS cloud storage and return it to the end user through CDN.

2. Request dynamic data

If the request is for dynamic data, when the user requests the web server in real-time or requests the database in real-time, it is a real-time return. At this point, static acceleration can be achieved. Through static acceleration, it is possible to accelerate a large number of static resource graphs and achieve true separation of motion and static. For example, images, dynamic web pages, etc. have achieved separate acceleration methods. In this scenario, the type of static file can be set by setting the path of the static file. For example, setting the TXT file type, JPG file type to achieve acceleration, or setting a certain URL to achieve acceleration. This is the function of static acceleration.

3、 Live streaming acceleration

1. The Alibaba Cloud CDN live streaming acceleration product can support customers with different live streaming input methods. Currently, it supports streaming RTMP/HTTP-FLV, and streaming supports RTMP/HTTP-FLV/HLSHDS

2. The intelligent scheduling system can locate user requests to the optimal node

3. The live streaming center is used to handle the processing of live streams, including transcoding rate, transcoding resolution, transcoding video encoding format, HLS slicing, etc.

4. The CDN edge nodes distributed worldwide are used to respond to end user requests in real-time and quickly.

Live streaming is accelerating. With the increasingly widespread and developed development of the Internet, there are many ways for users to obtain information, such as mainstream various video live streaming platforms, popular short video live streaming platforms on mobile devices, and so on. At this time, users no longer need to sit in front of a computer to interact with online anchors, and can directly access various live streaming platforms through their phones. When accessing the live streaming platform, we hope that users can have a very convenient experience. I hope it is high-definition and smooth, with the required delay. I hope the audio is clear. So, in this live streaming scenario, it is to meet the experience of a large number of users. When facing scenarios with a large number of concurrent users, the live streaming acceleration function provided by Alibaba Cloud can be used to intuitively improve the user access experience. For example: streaming, transcoding, distribution and playback, etc. Alibaba Cloud has provided a complete solution, and at this point, it has combined with CDN to achieve a perfect live streaming method. It will be more favorable in terms of price. Through this approach, users can completely bid farewell to the risks of live streaming lag, poor viewing experience, and even content theft. Live streaming acceleration can solve these problems to enhance user experience and meet their needs.

4、 Mobile application acceleration

Scenario: Multi terminal adaptive and enjoyable mobile network experience

Function: anti hijacking, multi terminal adaptation, dynamic and static acceleration

Function: Distribution of updated files (apk files) on mobile apps, optimization and acceleration of distribution of images, pages, short videos, UGC, and other content within mobile apps.

Acceleration of mobile applications. Various apps are used to access various applications. At this time, in order to accelerate the access experience of mobile users, HTT DNS can be introduced to speed up resolution. HTTP DNS resolution method follows HTTP, which can bypass local DNS to prevent resolution from being hijacked, achieve precise matching, or accelerate resolution in mobile scenarios. As shown in the figure, HTTPDNS is used to achieve nearby or fast recording methods. This approach is suitable for various types of terminals, such as Android and Apple. Strong adaptability to various terminals.

Why is HTTPDNS used in this scenario?

The ultimate goal is to solve the adaptation of multiple terminals. Dynamic and static acceleration is also supported, and can also be achieved through the middle CDN or edge CDN. Static content can achieve efficient caching and ensure accurate DNS resolution. In this scenario, CDN can also be used to improve the acceleration function of mobile applications.

5、 Full Station Acceleration

Scenario: E-commerce platform, dealing with sudden traffic issues such as online payments and flash sales.

Features: High performance, elastic bandwidth, and rich back-to-source strategies.

Function: Customizing dynamic and static content caching rules, optimizing access links, compressing and merging transmission content, intelligent routing, and link reuse

Full site acceleration and security acceleration are already separate and independent functions in Alibaba Cloud.

Look at the graph of the entire station accelerating. Improve the access experience of static resource mixed sites through full site acceleration (note: it is the access experience of static resource mixed sites). The advantage of this is that it supports edge caching of static resources. So, here you can see the CDN of an edge node. The optimal routing map source for dynamic content can meet the overall network access speed and stability requirements of the entire site. In this scenario, due to its high performance, it has a rich range of active strategies.

Especially in e-commerce scenarios where users need to respond quickly, experience quickly, and place orders quickly during Double 11 and Double 12 events, it is particularly suitable for full site acceleration.

Full station acceleration is suitable for sites with mixed dynamic and static characteristics, or for sites with pure dynamic characteristics.

The most typical example of full site acceleration is e-commerce platforms. Mainly used in scenarios with sudden high traffic or online flash sales, to improve the overall download speed of e-commerce platforms and solve the bottleneck of cross network or multi terminal access between the source station and users. When users place an order, they may use their phone or computer to place the order. The ultimate goal of improving user experience through full site acceleration is to reduce the sudden increase pressure on the source site.

6、 Safe acceleration

Scenario: Game platform. Ensure stable download and performance while avoiding traffic attacks

Features: High performance, elastic bandwidth, and security protection

Function: Solve the bottleneck of cross network and multi terminal access between the source station and players based on intelligent scheduling network, effectively resist web attacks, and ensure the security of the source station

Security acceleration: SCDN. It is a secure CDN.

Where the hell is safety?

Game platforms are a typical example. To achieve safety while steadily accelerating.

What is security? The main goal is to achieve protection against DDOS attacks or CC attacks. Through Alibaba Cloud's intelligent scheduling system, DDOS malicious attack requests are smoothly switched to peak IP addresses to complete cleaning operations to ensure the security of the source site.

Game platforms, finance, e-commerce, government enterprises, medical industry, internet industry, etc. all need to be protected from attacks and interference through security acceleration. While avoiding attack interference, achieving secure acceleration can balance the improvement of content acceleration and ensure smooth operation across networks or multiple terminals.

In the above figure, a CDN intermediate source with security capabilities is used to prevent the source station from being attacked by DDOS. In this scenario, safe acceleration can be chosen.

7、 Large file acceleration

Scenario: High cost performance, stable high-speed download

Function: cost recovery, high performance, and flexible scheduling

Function: Support the download and distribution of various files, and support online on-demand acceleration services, such as MP4, FLV video files, or average single file size above 20M

Users need to download a particularly large file (usually a file of over 20 megabytes, a large video file of one or two gigabytes). In this scenario, it is particularly suitable for video on demand. It is recommended to use it in conjunction with object storage to accelerate parsing speed and improve storage access through object storage. This approach greatly saves bandwidth costs. So, it is high-performance and uses OSS storage to solve storage problems. Real time monitoring or automatic invocation can be achieved through flexible scheduling.

To solve problems such as downloading or network instability, you can use large file download acceleration.

8、 Billing method

When users activate Alibaba Cloud CDN, the billing methods include basic services and value-added services. Basic service billing method: billing based on traffic or peak bandwidth

Value added service billing method: Domain names that enable HTTPS functionality or have a business type of "full site acceleration" will be additionally charged for static HTTPS requests. The real-time log service and image yellow recognition function are also charged separately.

1. Billing method: Peak bandwidth

Description: Charge based on daily peak bandwidth. Every 5 minutes, a bandwidth data is collected, and 288 values are obtained daily, with the highest value taken.

Usage scenario: The traffic curve is relatively stable and does not fluctuate from high to low. The daily utilization rate of internal network bandwidth is relatively high, exceeding 30%.

2. Billing method: Traffic

Description: Charged based on the actual traffic flowing out from Alibaba Cloud CDN nodes on a daily basis.

Usage scenario: The traffic curve fluctuates greatly with bandwidth spikes, and the bandwidth utilization rate is less than 30% throughout the day. Determined based on actual flow rate.

3. Billing method: Traffic package

Description: One time payment, with a validity period of one year for the traffic package. Similar to sharing traffic packets.

Usage scenario: Only applicable to billing by traffic. If the current billing type is bandwidth peak, the remaining traffic packet will be frozen until switching back to billing by traffic before it can be used.

Note: Pay by traffic, and the bandwidth cannot exceed 10 gigabytes. For more detailed pricing methods, please refer to the instructions on Alibaba Cloud's official website.

9、 CDN Service Level Agreement

The Service Level Agreement (SLA) specifies the service availability level indicators and compensation plans for the CDN (CDN) provided by Alibaba Cloud to customers.

CDN service availability not less than 99.90%

SLA=Protocol Definition: Service Cycle, Total Score of Service Cycle, Failed Requests, Total Effective Requests..., Service Availability Commitment, Service Availability

Service availability=[(total minutes of service cycle - minutes of service unavailability)/total minutes of service cycle] × 100%

Alibaba Cloud promises a reliability of no less than 99.9%. If it falls below this commitment, corresponding compensation can be provided to the user. SLA has corresponding standards, such as determining whether availability is below 99.9% based on information such as service cycle, number of failed requests, number of valid requests, service cycle, and total service cycle score. If the availability is lower than 99.9%, users will receive certain compensation based on this agreement.

Through service level agreements, ensure the availability of users when using CDN, and ensure the guarantee promised to users after failure.

Related Articles

Explore More Special Offers

  1. Short Message Service(SMS) & Mail Service

    50,000 email package starts as low as USD 1.99, 120 short messages start at only USD 1.00

phone Contact Us