<div dir="ltr"><div class="gmail_default" style="font-family:monospace,monospace">Hi, I recently adopted some varnish servers and upgraded them to varnish 5.0.0 in debian-9 from the debian repositories.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Most metrics are good except the backend_req value which is too high. The default_ttl and TTL values set in the VCL code are all 10d (or equivalent in seconds)</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">When I checked the docs, I found out that in vcl_hit even if you return deliver, varnish starts a background fetch for that particular object if the object time has passed its TTL. In my case, BGF is always started.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">I checked the source code and in file varnisgd/cache/cache_req_fsm.c and function cnt_lookup around line 540, after VCL_hit_method called and it returned VCL_RET_DELIVER, a BGF is started without looking at the TTL value.</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">How can I change this behaviour in VCL or through a parameter ? Or is this a bug ?<br></div></div>