このページは、お客様の言語ではご利用いただけません。Huawei Cloudは、より多くの言語バージョンを追加するために懸命に取り組んでいます。ご協力ありがとうございました。
- What's New
- Function Overview
-
Product Bulletin
- Service Termination Policy Function Will Be Taken Offline
- Huawei Cloud CDN Will Verify the Ownership of All Domain Names
- Huawei Cloud CDN Will Add a Log Field
- Huawei Cloud CDN Will Adjust the Cache Logic of Status Code 400
- Huawei Cloud CDN Will No Longer Maintain the Log Combination Tool
- Huawei Cloud CDN Will Take the Old Analytics Offline
- Service Overview
-
Billing
- Billing Items
- Basic Service Billing
- Value-added Service Billing
- Prepaid Resource Packages
- Billing Examples
- Changing the Billing Option
- Traffic Package Renewal
- Expiration and Overdue Payment
- Bills
- Cost Management
- Stopping Billing
- High Bill Risk Warning
- Billing for Whole Site Acceleration
- OBS Billing for CDN Acceleration
- Billing FAQ
- Change History
- Getting Started
-
User Guide
- Domain Name Management
- Custom Domain Name Configuration
- Resource Package Management
- Cache Prefetch and Purge
- Analytics
- Analytics (New)
- Log Management
- Domain Certificate Management
- IP Address Check
- Security
- Permissions Management
- Enterprise Projects
- Auditing
- Monitoring
- Best Practices
-
API Reference
- Before You Start
- API Overview
- Calling APIs
-
API
- Domain Name Operations
-
Domain Name Configuration
- Querying IP Address Information
- Modifying the Status of Private Bucket Access
- Associating a Certificate with Multiple Domain Names
- Querying All Domain Names Associated with HTTPS Certificates
- Listing Resource Tags
- Creating a Resource Tag
- Deleting a Resource Tag
- Copying Domain Configuration
- Modifying the Full Domain Configuration
- Querying Domain Name Configuration
- Analytics
- Billing Management
- Quotas
- Log Management
- Cache Purge and Prefetch
-
Out-of-Date APIs
-
Domain Name Configuration
- Enabling or Disabling Range-based Retrieval
- Enabling or Disabling Redirect Retrieval
- Configuring a Referer List
- Querying a Referer List
- Querying Details About an ACL
- Setting an ACL
- Configuring a Cache Rule
- Querying a Cache Rule
- Configuring HTTPS Settings
- Querying HTTP Settings
- Adding or Modifying Response Headers
- Querying Response Headers
- Modifying Origin Server Details
- Modifying the Host Header
- Querying a Retrieval Host
-
Statistics Analysis
- Querying the Total Network Traffic
- Querying Details of Network Traffic
- Querying the Peak Bandwidth Value
- Querying Details of Network Bandwidth
- Querying Consumption Summary
- Querying Consumption Details
- Querying Consumption of Each Domain Name
- Querying Domain Consumption by Region
- Querying Domain Consumption by Carrier
- Querying Statistics About Each Domain Name Under a Region or Carrier
- Querying Statistics About Domain Names Under a Region or Carrier
- Querying Statistics About Domain Names by Region and Carrier
- Querying Statistics About Domain Names
- Downloading a Statistical Metric Table
- Querying Top Domain Names
- Querying Peak Bandwidth Data of a Domain Name
- Downloading a Table of Statistics by Region and Carrier
- Refreshing and Preheating (Old Version)
- Domain Name Operations
-
Domain Name Configuration
- Examples
- Permissions Policies and Supported Actions
- Appendix
- SDK Reference
-
FAQs
-
Functions
- What Is Whole Site Acceleration?
- What Service Types Does CDN Support?
- Does CDN Support DNS, HTTPDNS, and IP302 Scheduling?
- Which Protocols Does CDN Support?
- Does On-Demand Service Acceleration Support HLS and RTMP?
- Can CDN Identify Whether a User Is on a Desktop or Mobile Device?
- Does CDN Support Acceleration for a Single Web Page?
- Does CDN Support Binary File Acceleration?
- Does CDN Support Level-2 Domain Name Acceleration?
- Does CDN Accelerate POST Requests?
- Does CDN Have a Speed Limit?
- Does CDN Accelerate Local Access to Shopping Websites?
- What Origin Types Does CDN Support?
- Does CDN Support Domain Names That Contain Chinese Characters?
- Does Huawei Cloud CDN Support HTTP/3?
- Does Huawei Cloud CDN Support Content Encryption Before Distribution?
- Does Huawei Cloud CDN Support Intranet Acceleration?
- Can CDN Provide All PoP IP Addresses and Origin IP Addresses?
- Can I Migrate Domain Configurations in One Account to Another Account?
- Is the Principle of Accelerating Delivery of Static and Dynamic Content the Same?
- How Do I Stop the CDN Service?
- What Is the Maximum Size of a File to Be Uploaded to CDN?
- Does CDN Support Frequency Control?
- Does CDN Support Real-Time Monitoring?
- Does CDN Support Access Through Fixed IP Addresses?
-
Usage
- How Do I Enable CDN?
- How Do I Control and Assign CDN Permissions by Project?
- How Do I Grant Some CDN Permissions to IAM Users?
- Is the CDN Service Area Related to the Origin Server Location and ICP Filing?
- Will User Access from Other Regions Be Accelerated If I Select Chinese Mainland or Outside the Chinese Mainland as My Service Area?
- Does CDN Support Acceleration by Region?
- What Is the Conversion Rule for Traffic and Bandwidth?
- Does CDN Accelerate Access to the Origin Server of a Website, or Accelerate Access to the Domain Name?
- Can Wildcards Be Used as Part of an Acceleration Domain Name?
- What Are the Differences in CDN Acceleration Among the Three Service Areas?
- Can I Use the CDN SDKs?
- How Do I Select the Service Area If the Server Is Outside the Chinese Mainland but My Web Visitors Are in the Chinese Mainland?
- Is CDN Necessary If My Services Are Deployed Within a City?
- How Does CDN Determine the Region to Which a User Belongs?
- How Do I Direct Traffic from a Third-Party Platform to CDN?
- Can an Acceleration Domain Name Be Configured with Multiple Origin Servers?
- Can File Upload Be Accelerated?
- Can Users in the Chinese Mainland Access Origin Servers and Users Outside the Chinese Mainland Access CDN?
- Can I Use CDN If the Origin Port Is Not 80?
- Can I Use Global Acceleration If My Origin Server Is in the Chinese Mainland?
- How Do I Configure an Origin Server When It Is a Non-Huawei Cloud Object Storage Bucket?
- Does CDN Accelerate User Access from a Specified Line?
- What If the ICP License of My Acceleration Domain Name Expires?
- What Are the Differences Between an Acceleration Domain Name and an Origin Domain?
- Do Acceleration Domain Name and Origin Domain Both Need to Be Licensed by China's MIIT?
- Can CDN Provide Acceleration for a Domain Name That Houses Different Types of Services (Website, VOD, and File Download)?
- Why Is the Error Message Indicating Failed to Obtain the Domain ID Displayed When an IAM User Calls an API After the Enterprise Project Function Is Enabled?
- Can CDN Share an Acceleration Domain Name with Live?
-
Purchase and Billing
- What Will I Billed For?
- Will I Be Billed If My Domain Name Is Under Attack?
- Issues Related to CDN Traffic Packages
- Can I View the Billing Information of a Single Domain Name?
- Does CDN Charge for HTTP/HTTPS Requests?
- What Traffic Is Consumed When CDN Requests Resources from OBS?
- How Do I Set an Alert for the Remaining Traffic in a Traffic Package?
- How Do I Check the Bills of 95th Percentile Bandwidth?
- Why Is the Traffic Usage in a Traffic Package Different from That Shown in Analytics?
- Why Is My Account Balance Deducted Even If I Have Purchased a Traffic Package?
- Is Billing for On-Demand Service Acceleration the Same as That for File Download Acceleration?
- What Is a Retention Period?
- If Global Acceleration Is Configured, Are the Traffic and Bandwidth Consumptions in and Outside the Chinese Mainland Billed Separately?
- Why Is My CDN Not Working When My Account Is in Arrears?
- An OBS Bucket Is Being Used as the Origin Server and an OBS Pull Traffic Package Has Been Purchased. Why Isn't the Origin Pull Traffic Generated by CDN Being Deducted From the OBS Pull Traffic Package?
-
Domain Name Settings
- Does CDN Support the Configuration of Domain Names with Ports?
- Can a Subdomain Name Be Used as an Acceleration Domain Name?
- Can the CNAME of an Acceleration Domain Name Be Directly Accessed?
- Do I Need to Configure a Certificate for the Origin Server After Adding a Security Certificate to CDN?
- Can a Rejected Domain Name Be Modified and Added Again to CDN?
- Can Multiple Acceleration Domain Names Use the Same Origin Server IP Address?
- Can the OBS Bucket's Domain Name Be Used as an Acceleration Domain Name If an OBS Bucket Is Configured as an Origin Server?
- What Requirements Should I Meet Before Adding a Domain Name Whose Service Area Is Chinese Mainland?
- Can I Limit Access to Domain Names Based on QPS?
- Does Huawei Cloud CDN Accelerate Delivery of Content Redirected from VPN?
- Does My Domain Name Have to Be Resolved on Huawei Cloud?
- Can an Acceleration Domain Name Be Used in and Outside the Chinese Mainland?
- Why Do My Domain Requests Still Go to CDN PoPs After My Domain Name Has Been Disabled and Domain Resolution Has Been Changed?
- How Do I Configure a Certificate for a Wildcard Domain?
- Why Am I Seeing the "Incomplete certificate chain" Message?
- Why Am I Seeing a Message Indicating that the Certificate Format Is Incorrect?
- Are Self-Signed HTTPS Certificates Supported?
- After Force HTTPS Is Enabled, Why Are Parameters Missing in a POST Request When I Call an API Using HTTP?
- Can Users Use HTTP to Visit My Domain Name After HTTPS Is Configured?
- What Should I Do If the ICP License of an Acceleration Domain Name Expires?
-
Cache Settings
- Will the Cache on CDN PoPs Be Updated in Real Time?
- Does Huawei Cloud CDN Support Regular Expressions for Cache Policy Setting?
- Does CDN Support Batch Configuration of Cache Policies for Acceleration Domain Names?
- Does CDN Cache Status Codes 404 and 403?
- What Are the Default Cache Rules? Can I Modify the Cache TTL?
- Why Is the Cache Hit Ratio of a Domain Name with Whole Site Acceleration Greater Than 0?
- Does the Path in Cache Settings Refer to a Web Address or File Path on the Server?
- Why Is the CDN Cache Hit Ratio Low?
- Why Am I Able to Access and Download a File After It Is Deleted from an OBS Bucket?
- How Do I Cache the Homepage (Root Directory)?
- How Do I Check Whether a Cache Is Hit?
- Why Is the Latest Content Inaccessible Even When the Cache TTL Is Set to 0?
- Does Huawei Cloud CDN Support Caching octet-stream Stream Files?
- Why Are Certain Files Not Downloadable Even Though They Have Not Expired (365 Days)?
- How Do I Configure Cache for Resources That Do Not Need to Be Cached?
- Can I Specify a Directory and Filename Extension for Caching?
- When Hotlinking Happens, Will the Previous Cache Still Exist After I Change the Domain Name?
- All Resources Are Preheated, and the Cache TTL Is One Year. Why Is the Requested Content Still Being Pulled from the Origin Server?
- How Do I Synchronize Content Cached on CDN PoPs with That on the Origin Server?
- Why Does a Cache Rule Not Take Effect?
-
Troubleshooting
- Why Am I Seeing a Message Indicating that the Domain Name Already Exists When I Add a Domain Name for CDN Acceleration?
- Why Is My Domain Name Inaccessible After HTTPS Secure Acceleration Is Configured?
- Why Is Data Obtained from a CDN PoP Not the Updated Data?
- Why Is 304 Returned When a User Accesses a Resource Under My Acceleration Domain Name?
- Why Does Agency Creation for OBS Fail When an OBS Private Bucket Is Used as the Origin Server?
- Why Can't a Web Page Be Properly Displayed After the Origin Server's IP Address Is Changed?
- Why Do I Get an Access Failure and Access-Control-Allow-Origin Error?
- Why Does Baidu Spider Fail to Capture Data?
- Why Are All Files in the Bucket Displayed When Users Request a File from an OBS Bucket Connected to CDN?
- Why Does a Video Freeze After CDN Is Configured?
- Why Is My CDN Disabled?
- Why Does the System Always Display "301" After HTTPS Is Configured for a Domain Name?
- Why Do I Get Request Timed Out When Trying to Ping an Acceleration Domain Name?
- Why Are Incorrect Resources Being Pulled from My Origin Server?
- Why Is My Site Slow the First Time I Access It After CDN Is Configured?
- Why Is My Acceleration Domain Name Inaccessible Outside the Chinese Mainland?
- Why Is a File in an OBS Bucket with CDN Acceleration Enabled Automatically Downloaded When I Access the File?
- What Should I Do If a Domain Name Fails to Be Added?
- Why Are CDN PoPs Offline During O&M?
-
Cache Purge and Prefetch
- What Are the Differences Between Cache Purge and Cache Prefetch?
- Why Am I Seeing Insufficient Permission for Cache Purge and Prefetch?
- Why Does a Cache Prefetch Operation Fail?
- Does Cache Purge Refresh Content Cached on All PoPs?
- Should I Enter an Origin URL or Domain Name URL for Cache Purge and Prefetch?
- Why Does a Prefetch Task Remain in the Being Processed Status for a Long Time?
- How Do I Purge the CDN Cache Where the Domain Name Includes a Wildcard?
- Why Do Users Still Access the Stale Resource After It Has Been Updated on the Origin Server and Its Cache on CDN Has Been Purged?
- Does CDN Support Directory Prefetch?
- Are Cache Purge and Prefetch Mandatory?
- Do I Need to Purge or Prefetch the Cache of Both HTTP and HTTPS URLs?
- If CDN Is Enabled in and Outside the Chinese Mainland, Does It Need to Be Differentiated When Cache Purge and Prefetch?
- Can I Prefetch M3U8 Files?
- Can the Cache Be Automatically Updated After a Static File on the Origin Server Is Updated?
- Which Should I Do First, Purge or Prefetch, When I Want to Update Cache?
-
Security
- What Security Capabilities (Anti-DDoS/CC Attack Defense/Anti-hotlinking) Does CDN Provide?
- Does CDN Support IP Address Filtering?
- How Does CDN Respond to CC Attacks?
- Does CDN Prevent Content Hijacking?
- Does CDN Have Anti-DDoS Capabilities?
- Can CDN, WAF, and AAD Be Used Simultaneously?
- Can Certificates Be Updated Without Service Interruption?
- If a Referer ACL Have Been Configured for an OBS Bucket, Will the Settings Take Effect on the CDN Side?
- Does CDN Detect Viruses in an Acceleration File?
- Can Multiple Certificates Be Configured for a Domain Name?
- Will the Traffic Pass Through WAF If Both CDN and WAF Are Configured?
- How Do I Check If CDN Is Being Maliciously Used?
-
Statistics and Logs
- What Could Fall Into the "Other" Category in the Visitor Region Statistics?
- How Long Is the API Delay of the Top 100 URLs?
- What Are the Meanings of HEAD, HIT, and MISS in CDN Logs?
- What Does User-Agent OkHttp in CDN Logs Mean?
- How Many Days of Data Can Be Queried?
- Why Am I Seeing the Message "Fine-grained Authentication Failed" When I Call an API to Download CDN Logs?
- Why Is There No Data in Analytics?
-
Origin Pull
- In What Scenarios Does CDN Pull Content from an Origin Server?
- What Do I Fix Origin Pull Failures?
- Can CDN Pull Content from Third-Party Private Buckets?
- How Do I Check Whether Range Requests Are Supported for Origin Pull?
- If a Domain Name Is Attacked, Will Access Requests Be Directed to the Origin Server?
- What Are the Benefits of a Standby Origin Server?
- Does CDN Support Direct Origin Pull Through Crawler Access?
- What Is the Difference Between a Host and an Origin Server?
- How Does Origin Pull Work If Origin Servers Have Multiple IP Addresses?
- Why Are Incorrect Resources Being Pulled?
- How Do I View Origin Pull Records?
- Will CDN Download All Files If I Send a Status Code 206 to Request 100-Byte Content?
- Quota
-
Functions
-
Troubleshooting
- Overview
- Why Can't I Access a Web Page or Play a Video After I Enable CDN?
- Why Is It Still Slow to Access a Domain Name That Has Been Added for CDN Acceleration?
- Why Is the Displayed or Downloaded Content Incorrect After CDN Acceleration Is Used?
- Why Is a 4XX Status Code Returned When I Request Resources from My Acceleration Domain Name?
- Why Is a 5XX Status Code Returned When I Request Resources from My Acceleration Domain Name?
- Why Does a 301/302 Redirect Loop Occur When I Request Resources from My Acceleration Domain Name?
- Status Code and Handling Suggestions
- Why Am I Getting a Permission Error Message?
- Why Can't I Log In to My Domain Name or Why Is the Information of Other Users Displayed?
- How Do I Check Whether an Access Fault Is Caused by a CDN PoP or Origin Server?
- Why Is the Cache of a Resource Inconsistent on Different PoPs?
- Why Does the Configured Cache Rule Not Take Effect?
- What Do I Do If the Browser Displays a Message Indicating that a Cross-domain Exception Occurs After CDN Is Enabled?
- Change History
- WSA User Guide
- Videos
- Glossary
- General Reference
Show all
Copied.
Configuration Process
Background
A game website mainly serves users in the Chinese mainland. It has a large number of files such as software packages and pictures stored on OBS. As the number of users increased, game downloading and image loading became slower, especially for users who are far away from the file storage area. To address this issue, the website decided to use the CDN service to accelerate game downloads at the lowest cost and improve user experience.
Required Data
Item |
Description |
Example |
---|---|---|
Domain name |
Domain name of the game website. If the service area of your website is Chinese mainland or global, the domain name must be licensed by the Ministry of Industry and Information Technology (MIIT) and the license has not expired, according to China's Internet Management Regulations. Otherwise, CDN cannot provide the acceleration service for the domain name.
|
download.game-apk1.com (licensed) |
OBS bucket |
The OBS bucket version is 3.0 or later, the bucket policy is public read, and static website hosting is not enabled. |
obs-doc-test |
Procedure
- Store static resources such as images and software packages of the website in the prepared OBS bucket. You can create a bucket and upload files using OBS Console, OBS Browser, or SDK. For details, see OBS documentation.
- Add a domain name on CDN.
- Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.
The CDN console is displayed.
- In the navigation pane, choose Domains.
- On the Domains page, click Add Domain Names.
- Configure the domain name and CDN acceleration information.
- Service Area: Select Chinese mainland.
- Domain Names: Enter download.game-apk1.com. If you add this domain name to CDN for the first time, verify its ownership.
- Service Type: Select File download.
- Origin Server Settings
- Origin Protocol: Select Same as user.
- Type: Select OBS bucket.
- Address: Select the obs-doc-test bucket.
- Static website hosting: Do not select this option.
- Bucket: Select Public bucket.
- Priority: Select Primary origin server.
- Host Header: By default, the bucket domain name is used.
NOTE:
- If you use an OBS bucket created after January 1, 2022 as the origin server and want to enable online preview, log in to the CDN console, choose Domains in the navigation pane, click the target domain name, click the Advanced Settings tab, click Edit next to HTTP Headers, and set Content-Disposition to inline. For details, see How Do I Preview Objects in OBS in a Browser Online?
- If back-to-source by mirroring is enabled for your OBS bucket, do not select Static website hosting when adding an acceleration domain name. Otherwise, back to source does not take effect. For details, see Back to Source.
- Click OK.
- Log in to Huawei Cloud console. Choose Service List > Content Delivery & Edge Computing > Content Delivery Network.
- Configure a CNAME record on DNS.
After the domain name is added, CDN automatically generates a CNAME for the domain name. The CNAME cannot be accessed directly. You must add it to your domain's DNS records. Then requests for your domain name will be redirected to CDN PoPs for acceleration. In this practice, the automatically generated CNAME is download.game-apk1.com.c.cdnhwc1.com. The CNAME configuration method varies depending on the DNS provider. In this document, DNS provided by Huawei Cloud is used as an example. For details about how to configure CNAME records on other DNS providers, see Configuring a CNAME Record.
-
In the upper left corner of Huawei Cloud console, choose Service List > Networking > Domain Name Service.
The DNS console is displayed.
-
In the navigation pane, choose Public Zones.
The public zone list is displayed.
- Click the domain name you want to add a record set to. In this practice, the domain name is game-apk1.com.
- Click game-apk1.com. On the displayed page, click Add Record Set in the upper right corner. The Add Record Set dialog box is displayed.
Figure 1 Adding a record set
- Set the parameters as prompted. Use the default values for the parameters that are not listed in the following table.
Parameter
Description
Example
Name
Domain name prefix.
download
Type
Type of the record set.
CNAME – Map one domain to another
Line
Resolution line. The DNS server will return the IP address of the specified line based on the source of visitors.
You must add a Default line to ensure that the website is accessible to users of all carriers.
Default
TTL (s)
Cache duration of the record set on a local DNS server. If your service address changes frequently, set TTL to a smaller value.
5 min
Value
Domain name to be pointed to.
If CDN acceleration is not enabled, the value is the bucket domain name. If CDN acceleration is enabled, the value is the CNAME generated by CDN.
download.game-apk1.com.c.cdnhwc1.com
- Click OK.
-
- Check whether the CNAME record has taken effect.
Open the Windows command line interface and run the following command:
nslookup -qt=cname User-defined domain name bound to the bucket
In this practice, the user-defined domain name bound to the bucket is download.game-apk1.com. If the CNAME generated by CDN is displayed, the CNAME configuration has taken effect.
- Configure the file download URL.
Set the URL of the file to be downloaded in the code as follows: Domain name of the game website + Storage path of the file in the OBS bucket + File name.
In the following example, the game website's domain name download.game-apk1.com and the android.apk file under the game/3.2.1/ folder in the obs-doc-test bucket are used. Then the file download URL is as follows:
https://download.game-apk1.com/game/3.2.1/android.apk
- Verify the services.
After the game website is redeployed, log in to the website, browse web pages, and download games.
If images are displayed properly and the games are downloaded successfully, the acceleration configuration is successful.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot