The timeout period for HTTP origin fetch requests controls how long a point of presence (POP) waits for a response from your origin server. Setting this value too low causes premature failures during network instability. Setting it too high keeps failed connections open, which can exhaust your origin server's connection pool and block healthy requests. Configure this value based on your network conditions and the connection capacity of your origin server.
How it works
The HTTP origin fetch timeout measures the time before a Layer 7 HTTP request between a POP and your origin server expires. It does not include the time to establish the underlying Layer 4 TCP connection.
The timeout period includes time spent across inter-POP links and POP-to-origin links.

Timeout values
| Timeout type | Default | Configurable |
|---|---|---|
| TCP connection (POP to origin) | 10 seconds | No |
| Origin read timeout | 30 seconds | Yes |
| Origin write timeout | 30 seconds | Yes |
The maximum configurable timeout is 150 seconds. The default is 30 seconds. The recommended value is less than 60 seconds.
Adjust the origin read timeout and origin write timeout by configuring the Timeout Value parameter in the console. Both values are changed together through a single setting.
Origin fetch retry and probing
Retry order
Retries follow the priority of origin addresses in descending order. View origin address priorities in the Alibaba Cloud CDN console. If two addresses share the same priority, retries are distributed based on the weight ratio.
Retry granularity
Retries target each IP address individually.
If a domain name is configured as the origin address, CDN retries all IP addresses resolved from that domain before falling back to other origin servers.
Probes skip origin servers listed in the dead table.
Retry trigger
A POP sends a retry request when it receives an HTTP 5xx status code from the origin server. If no 5xx status code is returned, the timeout logic applies instead -- the POP retries after the configured timeout period expires.
Origin probing
CDN monitors the health of origin server IP addresses and removes unavailable addresses from the routing pool.
TCP connection failure:
If the TCP connection between a POP and an origin server fails or times out twice in a row, CDN removes the IP address from the available origin list and adds it to the dead table. No further origin fetch requests are sent to that IP address. The POP probes the IP address every 5 minutes by attempting a TCP connection. If the connection succeeds, the IP address is restored to the available origin list.
Normal TCP connection with HTTP errors:
If the TCP connection is healthy but the POP receives an HTTP 5xx status code, the IP address remains in the available origin list. A retry is triggered, and subsequent requests continue to be routed based on the weight ratio. Layer 7 HTTP errors on an otherwise healthy TCP connection do not automatically remove the IP address from the available origin list. To enable automatic removal in this scenario, submit a ticket.
Configure the timeout value
Log on to the Alibaba Cloud CDN console.
In the left-side navigation pane, click Domain Names.
On the Domain Names page, find the target domain name and click Manage in the Actions column.
In the left-side navigation tree of the domain name, click Origin Fetch.
In the Timeout for HTTP Back-to-origin Requests section, click Modify.
In the Timeout for HTTP Back-to-origin Requests dialog box, set the Timeout Value parameter.

Click OK.