百度智能云

All Product Document

          CDN

          Access the Domain Name

          Overview

          Process to access the domain name: Log into the console and have identity authentication -> enable CDN -> add a domain name and connect it to CDN -> Bind CNAME.

          CDN_gs_new_18.png

          Precondition

          • Baidu AI Cloud account is already registered. For specific operation, please see Registration of Baidu AI Cloud Account.
          • Identity authentication: Each account only needs to be authenticated once. Please select “Enterprise Authentication” or “Personal Authentication” according to the actual conditions. Click “Authenticate Now " to complete identity authentication. If you submit the certification during working hours, it will be finished within 30 minutes; submit the certification during non-working hours, it will be finished before 10:00 on the next day.
          • Domain name filing: Domain name filing needs a certain time (about 15 working days), and you are recommended to complete the filing of relevant domain name ahead of time.

          Enable CDN Service

          Application scenarios

          • When the users use the content distribution network CDN for the first time, they need to enable it, and CDN is a postpaid service.
          • After enabling successfully, the user can enter the "Content Delivery Network CDN - Domain Name Management" interface through Product Service>Content Delivery Network CDN”.

          Operation steps

          1. Log into the CDN Management Console and enter the "Content Delivery Network (CDN) " page.
          2. You can choose Billing by Traffic Usage or Billing by Daily Bandwidth Peak Value according to your needs (for billing details, click "Billing Standard ").
          3. Click Create Domain Name Acceleration or Enter Domain Name List, enter the CDN content distribution network CDN service page, which indicates the service is enabled successfully.

          Access CDN

          Background information

          • CDN service supports access to CDN acceleration by IP address, origin server domain name and BOS Bucket. Please select the configuration according to the actual situation.
          • After finishing the basic configuration access, please ensure your accelerated domain name DNS analysis points to the CNAME address to complete the last setting of CDN acceleration.
          • After you select the bucket to be accelerated, bind the domain name of the corresponding bucket as the CNAME domain name provided by CDN to access the CDN node and enable acceleration.
          • The postpaid products will be deducted in real time according to the actual use.

          Add a new domain name

          1.Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.

          2.Click Domain Name Management on the left navigation bar.

          3.Enter the page of domain name management, click Add a New Domain Name and enter the page of "Create Domain Name Acceleration".

          4.Select Business Type You have to select your business type when adding a domain name. Baidu AI Cloud recommends corresponding features and configurations based on the different business types selected by you. Once you confirm the business type, you cannot modify it.

          Business type Description Recommended configuration by default
          Small image file acceleration The contents to be accelerated on your website are small static resources most (such as small files, photos and webpage-style files, etc.), you are recommended to select the acceleration type for photos and small files HTTPS, Refer hotlink protection, IP blacklist and whitelist, page optimization and compression, cache Key value
          Large file download acceleration If your contents to be accelerated are large files, such as game installation pack, application update, application package download and other scenarios, it is recommended to select the download acceleration type of large files. HTTPS, Refer hotlink protection, IP blacklist and whitelist, Range origin, pre-loading
          Streaming on-demand acceleration If your acceleration content is audio or video files, such as acceleration service of mp4, flv video files on demand or acceleration service of streaming media, you are recommended to use the acceleration type of streaming media on demand. HTTPS, authentication setting, Refer hotlink protection, IP blacklist and whitelist, Range origin, video drag, pre-loading
          Dynamic and static accelerations If your website or application contains lots of mixed dynamic and static contents and dynamic resource requests are dominating, you can use the dynamic and static acceleration type. HTTPS, authentication setting, Refer hotlink protection, IP blacklist and whitelist, Range origin, video drag, dynamic acceleration enabling

          Note For stock domain names, the business type is general type by default, and you can modify it once on the domain name details page.

          image.png

          5.Fill in Domain Name Information, and the domain name is the one you want to accelerate. This domain name must be filed, and you cannot connect domain names which are being filed or not filed; the origin servers of all accelerated domain names shall be the same

          6.Select Origin Server Type and fill in Origin Server Address.


          Parameter Description
          Business type Select business classification according to conditions.
          Accelerated domain name Please enter the domain name to accelerate, such as image.mywebsite.com. The notes are as follows:
          • All the accelerated domain names should have the same origin servers;
          • domain name must be completely filed, and the one under the process of filing or not filed cannot access to ing. Please check the domain name filing conditions ahead of time, filing entry
          Origin server type Select the origin server as “origin server domain name”, “IP address” or “BOSBucket” according to the circumstances. The points for attention are as follows:
          • The origin server address can be your own server address or a rented cloud server address.
          • When origin server is “origin server domain name”, the origin server domain name cannot be the same as the accelerated domain name.
          • When the origin server type is “BOS Bucket ", the specified Bucket must have been created in BOS, and CDN automatically initiates the domain name binding operation after the specifying.
          • Support to bind a BOS Bucket with the same domain name; the number of domain name that is bound with the same BOS Bucket cannot exceed 20; if the number of domain name that is bound with the same BOS Bucket exceeds 20 or the domain name has been bound with other BOS Bucket, the CDN automatic binding will fail, the domain name need to be unbound manually. Please refer to unbind Bucket domain name for specific operations.
          Address of primary origin server Enter the address of origin server, you can add 10 IP addresses at most, and multiple IPs are separated by newline character. The points for attention are as follows:
          • The weights are equal by default. Baidu AI Cloud CDN can prepare the priority of a precise origin server IP address and support to set a custom weight for the origin server. CDN assigns origin traffic according to the weight configured by user. If you do not set the weight, it defaults that IP addresses have the same weight. For example: For example, there is 1 G origin traffic and 2 IPs. Weight of one IP is 80%, and the other is 20%, then one IP has about 800M origin and the other has about 200M origin.
          • Unavailability of primary origin server refers to: TCP connection failed and no response to CDN detecting origin server for three consecutive times, or no response from origin server within timeout and no response to CDN detecting origin server for three consecutive times.
          • If multiple primary IPs are set, CDN will record the unavailable IP in the IP list, and will switch to standby IP when all IPs in the primary IP are not accessible.
          • If only one primary IP is set, when the primary IP is detected as inaccessible, the standby IP is accessed and the primary IP is detected for recovery or not. When the primary IP is restored, the request forwarded to the origin is switched back to the primary IP.
          • If a backup origin server is configured, CDN will request the backup origin server while detecting the primary origin server when the primary origin server is not available (i.e. when the primary origin server is down or no detection is possible). It switches to the primary origin server after it is restored.
          • When BOS Bucket origin server is configured with the primary and standby origin servers, the primary and standby origin servers cannot be the same Bucket. In order to improve the service quality, the main and backup origin servers are suggested to select different Region Buckets.
          Standby origin server address Input the backup origin server address, 10 IP addresses can be added at most, and the new line character should be used for separating multiple IPs. The points for attention are as follows:
          • The weights are equal by default. Baidu AI Cloud CDN can prepare the priority of a precise origin server IP address and support to set a custom weight for the origin server. CDN assigns origin traffic according to the weight configured by user. If you do not set the weight, it defaults that IP addresses have the same weight.
          • When the primary origin server is unusable, CDN accesses the standby origin server, until the primary origin server is restored
          • Configuring a standby origin server effectively reduces the failure rate of forwarding to origin and improves the service quality.

          Note: After completing configuring the origin server of the accelerated domain name, if you want to modify it, you can select Management of the corresponding domain name on the CDN domain name management page, enter the domain name details page, click Modify on the right to complete modifying settings of the origin server.

          Domain Name Conflict

          Overview

          Domain Name Conflict Handling is an optimized mechanism of Baidu AI Cloud CDN to handle conflicts between accounts due to the addition of the same domain name.

          Under the processing mechanism of domain name conflicts, when the accelerated domain name you attempt to add conflicts with the existing domain name in the system record, Baidu AI Cloud CDN will determine the ownership of the account with domain name conflict finally by combining the use of existing domain name in the system record as well as DNS privilege authorization results of the domain name you attempt to add.

          If It is detected that some domain name in the system record is not in use, and you have the privilege to modify the domain name DNS, Baidu AI Cloud CDN will cancel the old domain name in the system record. When logging out, Baidu AI Cloud CDN informs the users owning old domain names through two forms, including sending internal messages and SMS.

          Operation steps

          1.Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page. 2.Click Domain Name Management on the left navigation bar. 3.Enter the domain name management page, and click Add a Domain Name. 4.Fill in the basic information of the domain name, and enter a new domain name in Accelerated Domain Name. 5.If the domain name box becomes red, it means the system has detected domain name conflict. 6.Please complete the following operation according to system prompt: :

          • Prompt “Submit ticket completion application”: You have to submit a detailed Ticket to the background, and we will return the processing result to you in time;
          • Prompt: “Add a domain name again ": Click the "Verification Methods" on the right, and verify according to the steps prompted by the system;

            • If the verification succeeds, the existing domain name with conflicts will be canceled, and you can add such "Acceleration Domain Name" on the page of "Add a New Domain Name";
            • If the verification fails, please check whether your domain name is filled in correctly.

          Cache expiration configuration

          Overview

          Cache configuration refers to a set of expiration and elimination rules that CDN nodes follow when caching resources. CDN cached resources have a certain expiration time; before the resource expires, the node responds to the request received; when the resource expires, the node requests the origin server to re-cache and sends the resource to the user.

          Operation steps

          1.Enter the information about Cache Expiration Configurations.

          image.png

          ParameterDescription
          Cache configuration typeDirectory cache configuration: For a directory-based cache configuration, for example, when the /test directory cache configuration is 100 seconds, all resource files under the user's domain name /test path expire on the node for 100 seconds.
          Cache configuration for file suffix: For the cache configuration with the file suffix name as reference for judging; for example, the cache configuration of the picture file jpg is set to 100 seconds, the jpg resource file expires at 100 seconds at the node.
          Status code cache configuration: The cache configuration that takes status code of forward-to-origin response as the judgment basis; for example, the cache configuration of 404 error status code is 3,600 seconds, and the expiration time of the 404 response in the origin server is 3,600 seconds at the node.
          Cache configuration of file name: For a cache configuration with an accurate file name starting with /, for example, when the/test.jpg cache configuration is 100 seconds, the expiration time of this file on a node is 100s.
          Two default characteristics of the cache configuration:
          • For any user request, if the current resource is not expired, the node responds, and if the current resource expires, request the origin server to cache and respond to the request.
          • If you do not configure any cache rule, it sets the expiration time of cached resources according to the response header of the origin server.
          Cache item/valueSpecify which specific resources are applicable to the cache configuration.
          Expiration timeOverdue time of resources on nodes
          WeightWeight represents the priority of cache rules, and the value range is 0-100. The higher the weight, the higher the priority, and the corresponding rule takes precedence. Rules with the same weight take effect randomly.

          Note

          • “Allow shared cache” option only works for extensive domain names. Select “Allow shared cache” to share the settings and cache rules for subdomains of the same extensive domain names.
          • When a user accesses a domain name, the console will configure the default cache automatically, and the user can edit the weight to adjust the priority for which the cache rules take effect. Cache contents include:

            • The global static files are cached for 30 days by default, with a weight of 2.
            • The cache time of the dynamic files, such as .php, .jsp, .asp and others, is 0 by default, with a weight of 3.
            • Cache control weight in the origin server HTTP Header is 1.
          • The cache setting of the CDN console is of higher priority than the setting of HTTP Header of the origin server. If you want the priority of the origin server to be higher than that of the console setting, you can modify the weight of the corresponding rule to achieve it.

          2.After adding, return to the domain name list page; click Target Domain Name, and configure the domain name according to actual needs.

          Add tag

          Overview

          Users can add tags to domain name according to the needs of projects and scenarios, which facilitates the classification and identification management of the domain name.

          Operation steps

          1.Click "Add Tag" to set tag key and value.

          Please see Tag Management for detailed tag management description

          2.After you add a new domain name successfully, if you need to use the cache service provided by CDN, you need to bind CNAME. Please refer to [Bind CNAME](#Bind CNAME) for specific operations.

          Bind CNAME

          Overview

          CNAME records are alias records. This record allows you to map multiple names to the same computer. It is usually used for computers that provide both WWW and MAIL services. For example, there is a computer named "host.mydomain.com" (A record). It provides WWW and MAIL at the same time, and in order to facilitate the user's access to the service, two aliases (CNAME) can be set for the computer: WWW and MAIL. The full names of these two aliases are "www.mydomain.com" and "mail.mydomain.com". Actually they all point to "host.mydomain.com".

          Notes

          If you do not bind CNAME, you cannot use the cache service provided by CDN successfully. View the CNAME configuration status corresponding to the domain name on the domain name details page.

          Operation steps

          Method 1: CDN management console binding

          1.Log into the CDN Management Console and enter the “Content Delivery Network (CDN) " page.

          2.Click Domain Name Management on the Navbar to the left.

          3.Enter the "Domain Name Management Page"; click the target domain name in the action bar of domain name addresses, and then the target domain name information will appear on the right side of console page.

          4.Click Management, and enter the page “Domain Name Details”.

          5.Resolve the accelerated domain name to the CNAME record provided by CDN.

          Method 2: Bind the domain name service console

          1.If the domain name is applied for in Baidu AI Cloud, you can directly log into the Baidu AI Cloud console and click Domain Name Service in the left navigation bar.”

          2.Click the domain name that needs to bind CNAME, and view the detailed information of domain name;

          3.When the configurations take effect, all the requests of the domain name are transferred to the Baidu AI Cloud CDN node.

          View Domain Name Details

          Click the domain name to view, you can view the details of the domain name, including CNAME record, domain name origin server, domain name status, and other information.

          image.png

          Previous
          Operational Guideline
          Next
          Manage Domain Name