Alibaba Cloud CDN supports the following types of origin server: Object Storage Service (OSS) endpoints, IP addresses of origin servers, domain names of origin servers, and Function Compute domain names. You can specify one or more origin servers of each type and specify primary and secondary origin servers to balance loads. This topic describes how to add an origin server, modify the information about an origin server, and configure a health check policy for origin servers.
Add an origin server or modify the information about an origin server
- Log on to the Alibaba Cloud CDN console.
- In the left-side navigation pane, click Domain Names.
- On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column of the domain name.
- In the Origin Information section, click Add Origin Sever in the upper-left corner of the origin server list
or click Modify in the Actions column.
Note For more information about the billing rules for the following scenarios, see OSS pricing.
- To add an origin server, click Add Origin Server in the upper-left corner of the origin server list.
- To modify the information about an origin server, click Modify in the Actions column.
- If you set Origin Info to IP or Site Domain, data transfer through OSS is billed at the price of outbound data transfer over the Internet.
- If you set Origin Info to Site Domain and specify an OSS endpoint, data transfer through OSS is billed at the price of outbound data transfer over the Internet.
- If you set Origin Info to OSS Domain, requests sent to CDN edge nodes are redirected to OSS. Data transfer through OSS is billed at the price of outbound data transfer on CDN edge nodes.
Parameter Description Origin Info Enter the information about the origin server. If the requested resources are not cached on edge nodes, requests are redirected to the origin server to retrieve the resources. You can add at most 20 origin servers.
- OSS Domain
If your resources are stored in an Object Storage Bucket (OSS) bucket, you can enter the public endpoint of the OSS bucket, for example, xxx.oss-cn-hangzhou.aliyuncs.com. Internal endpoints of OSS buckets are not supported. You can view the public endpoint of an OSS bucket in the OSS console. You can also select an OSS bucket that belongs to the current Alibaba Cloud account from the Domain Name drop-down list.
Enter the public IP addresses of one or more servers. Public IP addresses of Alibaba Cloud Elastic Compute Service (ECS) instances do not need to be reviewed.
- Site DomainEnter the domain names of one or more origin servers.Note The domain name of the origin server cannot be the same as the domain name to be accelerated. Otherwise, a DNS resolution loop occurs and requests cannot be redirected to the origin server.
- Function Compute Domain
Enter a Function Compute domain name that belongs to the current Alibaba Cloud account. You must set the Region and Domain Name parameters for the Function Compute domain name. For more information, see Overview.
You can set priorities to specify primary and secondary origin servers. The primary origin server has a higher priority than the secondary origin server. Alibaba Cloud CDN preferably redirects requests to the primary origin server.
For example, you have specified two origin servers: Server A and Server B. Server A is the primary origin server and Server B is the secondary origin server. In this case, Alibaba Cloud CDN preferably redirects requests to Server A. If Origin Server A fails, Alibaba Cloud CDN redirects user requests to Origin Server B. After Origin Server A recovers, Alibaba Cloud CDN fails back to Origin Server A.
If origin servers have the same priority, Alibaba Cloud CDN redirects requests to the origin servers based on their weights. This balances loads among the origin servers. The valid values of origin server weights are 1 to 100. A greater value indicates a higher priority. An origin server with a higher weight receives more user requests. The default weight is 10. You can specify a weight based on your business requirements.
For example, both Origin Server A and Origin Server B are specified as primary origin servers. The weight of Origin Server A is 80 and the weight of Origin Server B is 20. In this case, Alibaba Cloud CDN redirects user requests to both origin servers at a ratio of 8:2.
PortThe default port is port 80. You can specify a port based on the settings of your origin server. Valid values are 1 to 65535. Custom ports support only HTTP. If you want Alibaba Cloud CDN to redirect HTTPS requests to origin servers over custom ports, submit a ticket.
- If you specify a custom port, disable the origin protocol policy. Otherwise, the specified port cannot take effect. For more information, see Configure the origin protocol policy.
- If the origin server is an OSS bucket, OSS determines whether you can specify a custom port.
- Click OK.
Configure a health check policy for an origin server
CDN edge nodes provide Layer 4 (TCP) health checks on origin servers. CDN edge nodes perform health checks on origin servers to check the availability of the origin servers in case back-to-origin routing fails.
- Probes are sent to IP addresses. If the address of an origin server is a domain name, Alibaba Cloud CDN accesses the secondary origin server only if all the IP addresses that belong to the domain name are unavailable.
- Probes automatically skip origin servers that are in the dead table.