]> err.no Git - varnish/commit
Having thought long and hard about this, commit what I think is the
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 6 Mar 2007 22:40:06 +0000 (22:40 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 6 Mar 2007 22:40:06 +0000 (22:40 +0000)
commit002213f9ffe45e3f92398992499d778b7a2d5f17
tree4b1ba37f397d86422aadac3c583a92743722aa19
parente7bbdb2b8e5083f67a370c56a1de8e838acfde41
Having thought long and hard about this, commit what I think is the
new and simpler flow for version2.

Pass is now handled like a miss where the object will not be cached.

The main result of this is that we drag the entire object, header
and body, from the backend before transmitting it to the client,
thus isolating the backend from slow clients.

From a software engineering point of view it is a big improvement,
because it eliminates the need for all of cache_pass.c and we therefore
end up with less HTTP protocol implementations.

A side effect of this is that ticket #56 should be fixed now.

If the object is pass'ed before vcl_fetch{} that is, in vcl_recv{},
vcl_hit{} or vcl_miss{}, no "pass this" object is inserted in the
cache.  The confusion between "pass", "insert" and "insert_pass"
has been cleaned up, by the removal of the latter.

Pipe and Pass calls vcl_pipe{} and vcl_pass{} respectively, before
contacting the backend.  I havn't quite decided if they should
operate on the request header from the client or the one to the
backend, or both.

One possible use is to inject a "Connection: close" header to limit
pipe to one transaction.

A new vcl_hash{} has been added, it will allow customization of
which fields we hash on, instead of the default "url + Host:" but
this is not yet implemented.

vcl_fetch{} is now called after both the headers and body have been
picked up from the backend.  This will allow us to do more comprehensive
handling of backend errors later on.

A disadvantage to this is that if the object ends up as a "pass
this" object in the cache, we could possibly have released any
queued requests already after the headers were received.  If this
is transpires as a real-world problem, we can add a vcl_fetchhdr{}
which can do an early release (ie: "pass").

git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1277 d4fa192b-c00b-0410-8231-f00ffab90ce4
14 files changed:
varnish-cache/bin/varnishd/Makefile.am
varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_center.c
varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/bin/varnishd/cache_hash.c
varnish-cache/bin/varnishd/cache_pass.c [deleted file]
varnish-cache/bin/varnishd/cache_vrt.c
varnish-cache/bin/varnishd/mgt_vcc.c
varnish-cache/bin/varnishd/steps.h
varnish-cache/include/vcl.h
varnish-cache/include/vcl_returns.h
varnish-cache/lib/libvcl/vcc_fixed_token.c
varnish-cache/lib/libvcl/vcc_gen_fixed_token.tcl
varnish-cache/lib/libvcl/vcc_token_defs.h