V4 VCL roadmappery...

Artur Bergman sky at crucially.net
Mon Apr 8 08:20:09 CEST 2013


Ok,

If I end up in error and want to return the stale object, how would I do that?

Artur

On Apr 7, 2013, at 2:05 PM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:

> 
>> But wouldn't you want to know what the backend thinks before you return stale?
>> IE, would return stale make more sense in fetch or error?
> 
> Mostly returning stale will be for the same reason we have grace:
> get a backend fetch/refresh going, without piling up clients on
> the waiting list.
> 
> You have two places where you can do something of the sort you ask for.
> 
> In vcl_backend_response{} you decide if you want to use the
> backends response or not.  (I'm pondring if "restart" should have
> its own closed circuit on the backend side, so that restart fom
> vcl_backend_response{} sends you back to vcl_backend_fetch{}. Input ?)
> 
> In vcl_deliver{} you decide if you want to deliver whatever
> object you have at that time to the client.  Your alternatives is
> to go ahead with it, restart or synthetic.
> 
> 
> (One of the overall goals of decoupling client/backend more, is to
> make things like parallel ESI possible)
> 
> -- 
> 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.




More information about the varnish-dev mailing list