Varnish 3.0 slow backend fetches

Christian Hartlage c.hartlage at modenkg.de
Mon Aug 31 17:01:25 CEST 2015


Hi Andreas,

thanks for your response. You were completely right. Right before we returned hit_for_pass, the beresp.ttl was set to 0.
We thought this would be the correct way to do this, we should have read the manual better, since this behaviour is explicitly lined out there [1].

Best Regards,

Christian Hartlage


[1] https://www.varnish-software.com/book/3/VCL_Basics.html#vcl-vcl-fetch (red box)


> Am 31.08.2015 um 08:37 schrieb Andreas Plesner <apj at mutt.dk>:
> 
> On Sun, Aug 30, 2015 at 12:48:42AM +0200, Christian Hartlage wrote:
>> 
>> Testing these requests with curl showed that it takes nginx/php-fpm about
>> 0.2sec for a single response. For us it seems like varnish can do only 1
>> fetch at once, so that the backend request are blocking. Is that possible?
> 
> Sounds like you're doing return(hit_for_pass) in vcl_fetch without setting a
> TTL, thus effectively serializing all requests with the same hash.
> 
> If you set a TTL, varnish will cache that it can't cache that particular URL
> and not attempt to coalesce requests in the future.
> 
> -- 
> Andreas
> 
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc




More information about the varnish-misc mailing list