V4 VCL roadmappery...

sky at crucially.net sky at crucially.net
Sun Apr 7 22:28:58 CEST 2013


If you get a 304 from origin on a IMS to origin? Where would you end up. 

And why would you want to return stale from lookup? (I feel like I am missing part of the puzzle)

And is exp-obj the stale object?

Artur 

Sent via BlackBerry by AT&T

-----Original Message-----
From: "Poul-Henning Kamp" <phk at phk.freebsd.dk>
Sender: varnish-dev-bounces at varnish-cache.org
Date: Sun, 07 Apr 2013 20:20:45 
To: <varnish-dev at varnish-cache.org>
Subject: Re: V4 VCL roadmappery...


I have tried to distill the new vcl_lookup{} into one easy to understand
ASCII-graph (if you can't document it etc...)

   vcl_hash{}
       |
       |
       v
   ALWYAS_MISS ? --- N ----+
       |                   |
       |                   v
       |                lookup()
       |                   |
       v                   v
    "MISS" <-----------+---+------------+---------------+--------------+
       |               |                |               |              |
       |               v                v               v              v
       |           "BUSY ONLY"    "EXPIRED+BUSY"    "EXPIRED"        "HIT"
       |               |                |               |              |
       v               v                v               v              |
       +<--- Y ----IGNORE_BUSY ?   IGNORE_BUSY? -- Y -->+              |
       |               |                |               |              |
       v               N                N               v              | 
    insert             |                |            insert            | 
    our busyobj        v                |           our busyobj        |
       |          [WAITING LIST]        |               |              |
       |                                |               |              |
       |                                v               v              v
       +--------->  ret(bo)        ret(exp_obj)   ret(exp_obj+bo)  ret(obj)
		      |                 |               |              |
		      |                 |               |              |
		      |                 |               |              |
   vcl_lookup{}       |                 |               |              |
   returns            |                 |               |              |
     |                |                 |               |              |
     v                v                 v               v              v
   pass
		   unbusy                            unbusy        
		   fetch(pass)      fetch(pass)      fetch(pass)   fetch(pass)
		   deliver          deliver          deliver       deliver

   synth
		   unbusy                            unbusy        
		   synth            synth            synth         synth

   deliver         fetch            stream           fetch         deliver obj
		   deliver          busyobj          deliver


   deliver_stale   fetch            deliver          bg-fetch      deliver obj
		   deliver             exp_obj       deliver
							exp_obj

There is a footnote that I simply could not get in there: hit_for_pass
objects.

If vcl_lookup{} returns deliver or deliver_stale on one such, it will
be converted to "pass" and a SLT_VCL_Error will be logged.

That leaves one interesting corner case:  A hit-for-pass object has
expired but is still in cache and we come down the "EXPIRED" path
where we insert our own busyobj, expecting to refresh the cache
with our own fetch.

Ideally, we should keep that busyobject in there, do the fetch(pass)
and if the object still qualifies for hit-for-pass, mark the
busyobj as such, so that there is never a gap where we take a MISS
on a hit-for-pass.

If that's trivial, I'll do it, of not, I wont.

Comments etc...

-- 
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.

_______________________________________________
varnish-dev mailing list
varnish-dev at varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev


More information about the varnish-dev mailing list