Mailing List Archive

Question about Pass
Hello,

From the man page: "vcl_pass: Called upon entering pass mode. In this
mode, the request is passed on to the backend, and the backend?s
response is passed on to the client, but is not entered into the cache.
Subsequent requests submitted over the same client connection are
handled normally."

So when running varnishstat, what does 'Cache hits for pass' mean? Sicne
the above says that pass mode does not enter anything in the cache, but
it can still use the cache?

thanks for any insight,
james
Question about Pass [ In reply to ]
James Quacinella <james at nyi.net> writes:
> From the man page: "vcl_pass: Called upon entering pass mode. In this
> mode, the request is passed on to the backend, and the backend's
> response is passed on to the client, but is not entered into the
> cache. Subsequent requests submitted over the same client connection
> are handled normally."
>
> So when running varnishstat, what does 'Cache hits for pass' mean?
> Sicne the above says that pass mode does not enter anything in the
> cache, but it can still use the cache?

It means we found a record in the cache that indicates that a particular
object should be handled in pass mode. This can happen if vcl_fetch()
ended with "pass", e.g. if the backend sent a cookie.

DES
--
Dag-Erling Sm?rgrav
Senior Software Developer
Linpro AS - www.linpro.no
Question about Pass [ In reply to ]
In message <46A79303.2090001 at nyi.net>, James Quacinella writes:

>So when running varnishstat, what does 'Cache hits for pass' mean? Sicne
>the above says that pass mode does not enter anything in the cache, but
>it can still use the cache?

If you select "pass" in vcl_fetch(), an place-holder object will be
inserted in the cache which is maked "pass this one".

The next request to hit this object, will get a cache-hit, and then
use pass-processing.

The reason for this is that when we have a cache_miss, any
subsequent requests are "stalled" until the backend replies, so
finding out that an object shouldn't be cached all the way down
in vcl_fetch() can potentially be a bottleneck.

Inserting the "pass" object, means that the subsequent requests
of this object don't risk this pile-up.


--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.