DNS lookups, upload retries, and timeouts

Encoders must perform DNS lookups whenever an error occurs. Any time there is an upload error, server abort, connection timeout, or HTTP timeout, encoders should perform a DNS lookup to ensure that they continue to be connected with the appropriate server.

If the entry point sends a Connection=close header in the response, then the encoder needs to re-resolve the domain (for all formats including RTMP).

The following table summarizes how the failure conditions are handled.

Error condition Object type Handling
-TCP connection attempt timeout

-Abort midstream

-TCP send or receive timeout

Manifest Re-resolve DNS on each retry and retry indefinitely.
-TCP connection attempt timeout

-Abort midstream

-Response timeout

-TCP send or receive timeout

Data (media, timed text) Re-resolve DNS on each retry and continue uploading until n seconds, where n is the value of segment duration. After it reaches the segment duration value, drop the current data and continue with the next segment data.

If segment duration is low (such as 2s or 1s), uploading might exceed the segment duration time and the encoder will back up.

HTTP 403, 400 Any Do not retry - display error reason.
HTTP 5xx Data (media, timed text) Re-resolve DNS on each retry and continue uploading until n seconds, where n is the value of segment duration. After it reaches the segment duration value, drop the current data and continue with the next segment data.

To maintain continuity of the DVR time-line, continue to upload the missing segment as a lower priority.

If segment duration is low (such as 2s or 1s), uploading might exceed the segment duration time and the encoder will back up.

HTTP 5xx Manifest Re-resolve DNS on each retry and retry indefinitely.