[RFC] version 2 state diagram (take 2)

Dag-Erling Smørgrav des at linpro.no
Mon Feb 12 13:57:31 CET 2007

Poul-Henning Kamp <phk at phk.freebsd.dk> writes:
> I would appreciate if you call could take a moment to look at this
> diagram and see if it makes sense:
> 	http://phk.freebsd.dk/misc/varnish.png

It certainly is a lot more readable than the complete diagram

I assume all the red arrows point to vcl_error()?

> The plot has gotten simpler, partly because I did it by hand instead
> of using dot(1), but more so because I found out that I needed to
> trust VCL to do more things.


>     vcl_hash{}
> 	Place holder for the idea that it might be desirable to
> 	hash on more or different fields than (URL+Host:).
> 	Not fully thought through yet, may or may not happen.

Strictly speaking, you need to hash on every header mentioned in
Vary:, but you don't even have that information until you've retrieved
at least one version of the document from the backend - and even then,
when a new request comes in, you need to identify the requested
document to know which headers to hash on - so it looks like we need a
two-level hash.

>     vcl_hit{}
> 	Not really sure what you would do here, but you get
> 	the chance if you dream up something.
> 	One possible thing would be to react to high hitrates
> 	and initiate compression.

...or check the time remaining before expiry and initiate a prefetch?
You don't mention vcl_timeout, which in any case isn't called until
after the document has expired.

Dag-Erling Smørgrav
Senior Software Developer
Linpro AS - www.linpro.no

More information about the varnish-misc mailing list