Configure the origin request timeout to control how long the service waits for an HTTP response from your origin server. A timeout that is too short may cause frequent failures due to network fluctuations, while a timeout that is too long lets failed requests occupy connections and block new ones. Choose a value that matches your network conditions and origin server capacity.
Background information
The origin HTTP request time measures the Layer-7 HTTP request duration when or DCDN fetches content from an origin server. It excludes the time required to establish the Layer-4 TCP connection.
Notes
In Alibaba Cloud DCDN, the maximum timeout for an end-to-end link is 150 seconds. An end-to-end link includes the internal link of a DCDN node and the link from the DCDN node to the origin server. The default timeout is 30 seconds. We recommend that you set the timeout to 60 seconds or less.
Origin fetch retries, origin fetch timeouts, and origin probing
Origin fetch retry order:
Origin server addresses are retried in order of priority, from highest to lowest.
If multiple origin server addresses have the same priority, the node retries them according to their configured weight.
Origin fetch retry granularity:
Retries are performed at the IP address level. If an origin server is specified by a domain name, the system retries all IP addresses resolved from the domain name. A node attempts to connect to another available origin server only if connections to all IP addresses for the current origin server fail.
During a retry, the system automatically filters out unavailable origin servers listed in the dead table.
Status codes for origin fetch retries:
A or DCDN node triggers an origin fetch retry when it receives a 5xx status code from the origin server.
Origin fetch timeout: If the origin server proactively returns a retry status code, the DCDN node retries as soon as it receives the status code. If the origin server does not return a retry status code, the DCDN node retries after the origin fetch timeout period is reached.
TCP connection timeout: 10 seconds.
Origin write timeout: 30 seconds by default (timeout for writing content to the origin server after a connection is established).
Origin read timeout: 30 seconds by default (the timeout for a or DCDN node to receive the complete response from the origin server after a connection is established).
You can adjust the origin write timeout and origin read timeout by configuring the origin fetch HTTP request timeout.
Origin probing logic:
TCP connection failure: If a TCP connection between a or DCDN node and an origin server IP address fails twice consecutively (for example, connection establishment fails or the connection times out), the or DCDN node removes the IP address from the list of available origin servers and adds it to the dead table. This prevents subsequent requests from being sent to this IP address. The or DCDN node then probes the IP address every 5 seconds by attempting to establish a TCP connection. If the probe is successful, the node restores the IP address to the list of available origin servers.
Normal TCP connection: If the Layer 4 TCP connection between a or DCDN node and an origin server IP address is stable, but the node receives a status code that triggers a retry (such as a 5xx error), the node triggers an origin fetch retry. However, the IP address of the origin server remains in the list of available servers, and subsequent requests may be sent to it based on its weight. By default, Layer 7 HTTP request failures do not block the origin server's IP address. To block an origin server IP address in the case of Layer 7 HTTP request failures, submit a ticket to enable this feature.
Procedure
-
Log on to the DCDN console.
-
In the left-side navigation pane, click Domain Names.
-
On the Domain Names page, find the target domain name and click Configure.
-
In the left-side navigation tree of the domain name, click Origin Fetch.
-
On the Origin Fetch tab, find the Origin Request Timeout section and click Modify.
-
In the Origin Request Timeout dialog box, set the Timeout Value.

-
Click OK.