All Products
Search
Document Center

Edge Security Acceleration:Origin request timeout

Last Updated:Jun 16, 2026

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.回源请求超时

Usage notes

For Alibaba Cloud and DCDN, the maximum end-to-end timeout for the entire link (including the link within or DCDN nodes and the link between or DCDN nodes and the origin server) cannot exceed 150 seconds. The default value is 30 seconds. We recommend that you set the timeout to 60 seconds or less.

Origin fetch retry, origin fetch timeout, and origin probing

  • Origin fetch retry order:

    • Retries are attempted on origin servers in order of their priority, from highest to lowest.

    • If multiple origin servers share the same priority, retries are distributed according to their configured weights.

  • Origin fetch retry granularity:

    • Retries are performed at the IP address level. If an origin server is specified by a domain name, the system attempts to connect to all IP addresses resolved from that domain name. Another available origin server is tried only after connections to all IP addresses for the current origin server have failed.

    • During a retry attempt, the system automatically skips any origin server IP addresses listed in the dead table.

  • Origin fetch retry status codes:

    • 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 responds with a retry-triggering status code, the or DCDN node retries immediately. Otherwise, the node waits until the timeout period expires before retrying.

    • Origin server TCP connection timeout: 10 seconds.

    • Origin server write timeout: 30 seconds by default (timeout for writing content to the origin server after a connection is established).

    • Origin read timeout: The default is 30 seconds. If the origin server does not send a complete response within this period after the connection is established, the request times out.

    • You can adjust both the origin server write and read timeouts by configuring the origin fetch HTTP request timeout.

  • Origin probing logic:

    • TCP connection failures: If a or DCDN node fails to establish a TCP connection with an origin server IP address twice consecutively, or DCDN moves the IP address to a dead table and stops sending requests to it. The or DCDN node probes the IP address every 5 seconds by attempting a TCP connection. If the connection succeeds, the IP address is restored to the available origin server list.

    • TCP connection is normal: If a DCDN node has a normal TCP connection to an origin server IP address but receives a 5xx status code, the retry logic is triggered. However, the IP address stays in the available origin server list and continues to receive requests based on its weight. A Layer 7 HTTP error does not block the origin server IP address when the Layer 4 TCP connection is healthy. To block the IP address on Layer 7 errors, submit a ticket to request this configuration.

Procedure

  1. Log on to the DCDN console.

  2. In the left-side navigation pane, click Domain Names.

  3. On the Domain Names page, find the target domain name and click Configure.

  4. In the left-side navigation tree of the domain name, click Origin Fetch.

  5. On the Origin Fetch tab, find the Origin Request Timeout section and click Modify.

  6. In the Origin Request Timeout dialog box, set the Timeout Value.

    image

  7. Click OK.

Related APIs

BatchSetDcdnDomainConfigs