bereq.first_byte_timeout

RTIME, can be read and set, but not unset.

Available inpassmiss

The amount of time Fastly should wait for a backend server to deliver the first byte of an HTTP response body, before triggering a timeout.

May be set to any value between 0 and 600s. By default, the timeout is 15s.

If the timeout is triggered, Fastly will create an error object and invoke vcl_error with obj.status set to 503 and obj.response set to "first byte timeout".

Effects of shielding and clustering

If clustering or shielding is enabled, the request will pass through more than one Fastly server before it is sent to the origin. Each Fastly server will consider the next Fastly server to be an origin and apply a separate first byte timeout.

The timeout between nodes in a cluster is always 60s and is not configurable. This means that, for services with clustering enabled, the effecctive maximum bereq.first_byte_timeout is 60s.

The timeout between POPs in a shielding arrangement is affected by the settings in each case, since the full VCL configuration will be executed at each POP separately. For example, to set a timeout that applies only when connecting to the origin and not when connecting to an upstream shield POP, use the following VCL:

sub vcl_miss { ... }
Fastly VCL
if (req.backend.is_origin) {
set bereq.first_byte_timeout = 10s;
}