Modifying Origin Server Settings
An origin server hosts your website content. CDN accelerates delivery of such content. You can modify the origin server details, such as the IP address, domain name, OBS bucket domain name, and origin port, on the origin server settings page.
CDN Origin Pull Mechanism
- If the origin servers have multiple IP addresses, the following load balancing mechanism is used for origin pull.
- An origin pull request can be forwarded to up to two high-priority IP addresses. If origin pull fails, the request is then forwarded to up to two low-priority IP addresses. If four attempts fail, the request fails.
- Origin pull fails when the connection times out, the connection fails, or a 5xx error code is returned from the origin server.
- If an origin domain name resolves to multiple IP addresses, CDN attempts to pull content from up to two of these addresses. If both are unreachable, it will try other origin servers.
Precautions
- Ensure that the origin server configuration is correct. Incorrect configuration of the origin server causes origin pull failures.
- If you have modified content on the origin server, refresh the CDN cache.
- If you have configured multiple origin IP addresses for a domain name whose service type is whole site acceleration, CDN pulls content from the IP address with the lowest latency by default. To balance origin pull to all IP addresses, submit a service ticket.
- When CDN pulls content, the origin server provider charges the bandwidth or traffic fees generated by the origin server. For example, the traffic generated when CDN pulls content from OBS is charged by OBS.
Procedure
- Log in to Huawei Cloud console. Choose .
The CDN console is displayed.
- In the navigation pane, choose .
- In the domain list, click the target domain name or click Configure in the Operation column.
- Click the Basic Settings tab.
- In the Origin Server Settings area, click Edit.
- Click Add below the origin server list. The Add Origin Server drawer is displayed.
Figure 1 Adding an origin server
Table 1 Parameters Parameter
Description
Type
IP address
- If an IP address is used as the origin address, CDN PoPs access the IP address directly to pull origin content.
- IPv4 is supported, but IPv6 is not supported.
- If multiple IP addresses are configured for the origin server, CDN uses the load balancing mechanism to pull content.
Domain name
- The origin domain cannot be the same as the acceleration domain name. Otherwise, user requests will be repeatedly resolved to CDN PoPs, and CDN PoPs will not be able to obtain content from the origin server.
- An origin domain starts with a letter or digit and contains up to 255 characters, including letters, digits, hyphens (-), and periods (.).
- You can also enter the domain name of an object storage bucket in this field.
NOTE:- Private buckets cannot be used as origin servers.
- If you use an object storage bucket as your origin server, the object storage service will charge the CDN origin pull traffic based on its billing standards.
OBS bucket
You can select the domain name of an OBS bucket under your account or customize one (OBS bucket under other Huawei Cloud accounts). OBS charges the CDN origin pull traffic based on the billing standard for outgoing Internet traffic. If you set a bucket of OBS 3.0 or a later version as the origin server, you can purchase OBS pull traffic packages to deduct origin pull traffic. For details, see OBS Billing for CDN Acceleration.
Important notes:
- If your OBS private bucket is unsuitable as an origin for your domain name, do not set the private bucket as the origin server.
- If a custom OBS bucket is used as the origin server, the origin domain name must end with .myhuaweicloud.com or .myhuaweicloud.cn.
- If an OBS private bucket is configured as an origin server, enable OBS authorization and select the Private bucket option. Otherwise, origin pull will fail.
- To use a custom OBS private bucket as the origin server, configure a policy for the private bucket. For details, see Configuring a Policy for a Custom OBS Private Bucket.
- If you have enabled static website hosting for your OBS bucket, select the Static website hosting checkbox when adding a domain name. In this way, the list of all files in the bucket will not be displayed when users access the bucket.
- When back-to-source by mirroring is configured on OBS and range requests are enabled on CDN, if the mirror origin server does not comply with the RFC Range Requests standard, the response to range requests is not 206 and CDN fails to pull content. In this case, submit a service ticket.
Address
Address accessed by CDN PoPs during origin pull.
Bucket
This parameter is mandatory when Type is set to OBS bucket.
- Public bucket: public read. All users can read objects in the bucket.
- Private bucket: Only users granted permissions by the ACL can access the bucket.
Priority
Select Primary origin server, Standby origin server, or Custom. If you select Custom, enter an integer from 1 to 100. A larger value indicates a higher priority. The default priority of the primary origin server is 70, and that of the standby origin server is 30.
- If only the primary and standby origin servers are configured:
- CDN pulls content from the primary origin server first. When the primary server is faulty, CDN pulls content from the standby origin server. This helps reduce origin pull failures.
- Configure at least one primary origin server.
- If you have configured a custom priority:
- CDN pulls content from the origin server with the highest priority first. If such origin server is faulty, CDN pulls content from the origin server with a lower priority.
Weight
The value ranges from 1 to 100. A larger value indicates a larger number of times that content is pulled from this origin server.
- If there are multiple origin servers with the same priority, the weight determines the proportion of content pulled from each origin server.
Origin Ports
Port numbers for CDN PoPs to pull content. By default, the HTTP port is 80 and the HTTPS port is 443.
- If Type is set to OBS bucket, the port numbers cannot be changed.
A host is specified in the HTTP request header. It is the domain name of the site accessed by CDN PoPs when CDN pulls content from the origin server. CDN obtains resources from the corresponding site based on the host details during origin pull.
After a domain name is added, the default host will be the domain name. Change the host in a timely fashion if either of the following conditions is met:- If you set Type to Domain name and enter the domain name of an object storage bucket, set the host to the domain name of the bucket.
- If you want CDN to pull content from a custom domain name, specify the host. For example, suppose an origin server is bound to two sites, www.origin01.com and www.origin02.com, and the domain name connected to CDN is www.example01.com. If you need CDN to pull content from www.origin02.com, you would need to set the host to www.origin02.com.
- Set the parameters and click OK. Repeat 6 to add more origin servers. You can add up to 50 origin servers.
- Click Save to add the origin server.
- Click Delete or Edit in the origin server list to delete or edit an origin server.
Examples
Assume that you want to migrate resources of an acceleration domain name to a server whose domain name is www.example.com and HTTPS port number for origin pull is 8080. You can modify the origin server settings on CDN as follows:
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