RFC 5861 support

Marcos Paulo Hack marcos.hack at abril.com.br
Tue Dec 4 13:58:47 CET 2012


Hi Andrea.

On Dec 4, 2012, at 6:08 AM, Andrea Campi <andrea.campi at zephirworks.com<mailto:andrea.campi at zephirworks.com>>
 wrote:


On Tue, Dec 4, 2012 at 2:42 AM, Marcos Paulo Hack <marcos.hack at abril.com.br<mailto:marcos.hack at abril.com.br>> wrote:
Hi Andrea.

As discussed in IRC channel, the grace mode should be used to implement the stale-while-revalidate directive, but there is no easy (or even viable) way to implement stale-if-error using VLC.

Do logs exist for that conversation? I would be interested in the rationale for that.

I couldn't find the channel log anywhere so I attached here.

At face value it sounds like a useful implementation of stale-if-error can be done in VCL using saint mode.

Other than that, I'll probably end up doing a VMOD anyway.

The only problem with stale-while-revalidate using grace mode is that it isn't really asynchronous as discussed here [1]. So a VMOD implementation should be required to be full compliance with the RFC.


Looking at the RFC some more, I have some questions. I'll probably get in touch with the editor of the RFC:

* I am unclear on whether this is intended for reverse proxies that can be considered "part of the application" or if remote proxies and user agents are allowed to use it too.
The use of Cache-Control suggest the latter, but in that case I would like to see an implementation in a browser before I start sending these headers out in the wild. I realize user agents are free to show stale content anyway, but they usually don't.
Vice versa, it looks like these extensions may be useful also in Surrogate-Control, where we can easily ensure they never make it past Varnish.

* I don't like stale-if-error in a request. I won't comment on its useful from the point of view of the user agent (other than saying it would make for a complex UI).
But from the point of view of Varnish, the only useful use case I can see is *reducing* the allowed staleness�since by definition it can't make it any longer than the time the object persists in the cache.
If I were to implement this, I would just ignore this in requests.

Thoughts? I'll probably start working on this and edge-arch over the next week, so any reasoned opinion is appreciated as it may very well save me time ;)

Good questions. You should talk to Mark Nottingham, indeed.

Just a side note: the folks of Traffic Server just finished their experimental implementation a month ago, maybe you can find some useful insights over there ;)

[1] https://www.varnish-cache.org/lists/pipermail/varnish-misc/2012-March/021800.html
[2] https://github.com/apache/trafficserver/tree/master/plugins/experimental/rfc5861

Regards.
Marcos



AVISO LEGAL: Esta mensagem e arquivos podem conter informacoes confidenciais e ou legalmente protegidas. 
Caso tenha recebido por engano, favor devolve-la ao remetente e elimina-la do seu sistema, nao divulgando ou utilizando a totalidade ou parte desta mensagem ou dos documentos a ela anexados.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20121204/7be68fc7/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: linpro_varnish_channel-RFC5861.txt
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20121204/7be68fc7/attachment.txt>


More information about the varnish-dev mailing list