Question about first_byte_timeout and ESI

andan andan armdan20 at
Tue Apr 26 15:11:40 CEST 2011

Hi there.

I've been playing with first_byte_timeout parameter.

Supposing the following script:

       echo ('hi there');

And a simplified VCL like this:

backend test {
        .host = "x.x.x.x";
        .port = "80";
        .first_byte_timeout = 1200ms;

sub vcl_recv {
                set req.backend = test;

sub vcl_fetch {

When I request http://test/sleep.php after 1200 milli seconds Varnish
returns a 503, this is the expected behaviour.

But, when we have an html with esi code like this:

        <esi:include src="/sleep.php"/>

When I request http://test/test.html, the 503 is thrown after 2400
milliseconds. As you can see is exactly double of first_byte_timeout.
If other esi:included is set, the elapsed time goes to 3600
milliseconds, and so on.

My question, is this the expected behaviour ????

Thanks in advance.
Kind Regards.

More information about the varnish-misc mailing list