<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Yeah, you want grace mode:</div><a href="https://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html#grace-mode">https://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html#grace-mode</a><div><br></div><div>As it says on that page, "it serves stale content to avoid request pile-up."</div><div><div><br><div><div>On 20 Mar 2012, at 10:06, <a href="mailto:varnish-misc-request@varnish-cache.org">varnish-misc-request@varnish-cache.org</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Send varnish-misc mailing list submissions to<br><span class="Apple-tab-span" style="white-space:pre"> </span><a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br><br>To subscribe or unsubscribe via the World Wide Web, visit<br><span class="Apple-tab-span" style="white-space:pre"> </span>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc<br>or, via email, send a message with subject or body 'help' to<br><span class="Apple-tab-span" style="white-space:pre"> </span>varnish-misc-request@varnish-cache.org<br><br>You can reach the person managing the list at<br><span class="Apple-tab-span" style="white-space:pre"> </span>varnish-misc-owner@varnish-cache.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of varnish-misc digest..."<br><br><br>Today's Topics:<br><br> 1. Re: Stale-While-Revalidate or Similar (Graham Lyons)<br> 2. Re: Stale-While-Revalidate or Similar (Michael Borejdo)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Tue, 20 Mar 2012 09:50:54 +0000<br>From: Graham Lyons <graham.lyons@bbc.co.uk><br>To: varnish-misc@varnish-cache.org<br>Subject: Re: Stale-While-Revalidate or Similar<br>Message-ID: <9303601D-DC59-45DA-BCCB-6B0D3621557E@bbc.co.uk><br>Content-Type: text/plain; charset="us-ascii"<br><br>Hi Michael,<br><br>There is a similar feature to this available in Varnish:<br>https://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html<br><br>Grace and saint modes correspond roughly, respectively to stale-while-revalidate and stale-if-error proposed in RFC5861.<br><br>Graham.<br><br>On 20 Mar 2012, at 09:24, varnish-misc-request@varnish-cache.org wrote:<br><br><blockquote type="cite">Send varnish-misc mailing list submissions to<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>varnish-misc@varnish-cache.org<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">To subscribe or unsubscribe via the World Wide Web, visit<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc<br></blockquote><blockquote type="cite">or, via email, send a message with subject or body 'help' to<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>varnish-misc-request@varnish-cache.org<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">You can reach the person managing the list at<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span>varnish-misc-owner@varnish-cache.org<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When replying, please edit your Subject line so it is more specific<br></blockquote><blockquote type="cite">than "Re: Contents of varnish-misc digest..."<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Today's Topics:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"> 1. Re: Varnish client IP address not display (MassiveScale.net)<br></blockquote><blockquote type="cite"> 2. VUG5 Paris BOF (Jonathan Matthews)<br></blockquote><blockquote type="cite"> 3. Re: Communication between Varnish and the Backend (Hugues Alary)<br></blockquote><blockquote type="cite"> 4. using the max-age request header (Jeroen Ooms)<br></blockquote><blockquote type="cite"> 5. Re: Communication between Varnish and the Backend (Per Buer)<br></blockquote><blockquote type="cite"> 6. Stale-While-Revalidate or Similar (Michael Borejdo)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">----------------------------------------------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Message: 1<br></blockquote><blockquote type="cite">Date: Mon, 19 Mar 2012 12:39:36 +0100<br></blockquote><blockquote type="cite">From: "MassiveScale.net" <info@massivescale.net><br></blockquote><blockquote type="cite">To: varnish-misc@varnish-cache.org<br></blockquote><blockquote type="cite">Subject: Re: Varnish client IP address not display<br></blockquote><blockquote type="cite">Message-ID: <4F671AF8.3060201@massivescale.net><br></blockquote><blockquote type="cite">Content-Type: text/plain; charset=ISO-8859-1<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On 03/19/2012 09:02 AM, Stewart Robinson wrote:<br></blockquote><blockquote type="cite"><blockquote type="cite">Jewel,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">What header are you checking on the back end?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">You should be reading the x-forwarded-for header rather than some form<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">of remote_addr.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Alternatively, if your backend server is Apache, you could use mod_rpaf<br></blockquote><blockquote type="cite">http://stderr.net/apache/rpaf/<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">Andrzej Godziuk<br></blockquote><blockquote type="cite">http://MassiveScale.net/<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Message: 2<br></blockquote><blockquote type="cite">Date: Mon, 19 Mar 2012 13:25:22 +0000<br></blockquote><blockquote type="cite">From: Jonathan Matthews <contact@jpluscplusm.com><br></blockquote><blockquote type="cite">To: varnish-misc@varnish-cache.org<br></blockquote><blockquote type="cite">Subject: VUG5 Paris BOF<br></blockquote><blockquote type="cite">Message-ID:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><CAKsTx7Dv1rf62dJ6XYMo0n+vcB02nP7fyxX9CcPaPw2KbHUD-Q@mail.gmail.com><br></blockquote><blockquote type="cite">Content-Type: text/plain; charset=UTF-8<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi all -<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I'm heading along to VUG5 this week - really looking forward to<br></blockquote><blockquote type="cite">meeting a lot of you and seeing how you're using and abusing our<br></blockquote><blockquote type="cite">favourite tool :-)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When I signed up, I don't recall ticking the "BOF" checkbox - could<br></blockquote><blockquote type="cite">anyone let me know if it's too late to get in on that action?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Either way, are people (like me) who are attending *just* the user day<br></blockquote><blockquote type="cite">(Thursday) perhaps looking for more Varnish chat on the Friday or the<br></blockquote><blockquote type="cite">weekend? I'm there 'til Sunday, and would love to get the most out of<br></blockquote><blockquote type="cite">a high concentration of Varnish-literate folk!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">All the best,<br></blockquote><blockquote type="cite">Jonathan<br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">Jonathan Matthews<br></blockquote><blockquote type="cite">London, Oxford, UK<br></blockquote><blockquote type="cite">http://www.jpluscplusm.com/contact.html<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Message: 3<br></blockquote><blockquote type="cite">Date: Mon, 19 Mar 2012 12:50:23 -0700<br></blockquote><blockquote type="cite">From: Hugues Alary <hugues.alary@gmail.com><br></blockquote><blockquote type="cite">To: varnish-misc@varnish-cache.org<br></blockquote><blockquote type="cite">Subject: Re: Communication between Varnish and the Backend<br></blockquote><blockquote type="cite">Message-ID:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><CAN-YAk8S=dCxUXR5GbyC3+s3oSgis0+doetcw0N8QUGPJ1Mteg@mail.gmail.com><br></blockquote><blockquote type="cite">Content-Type: text/plain; charset="iso-8859-1"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Happy Monday everybody,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Nobody, got some good advices for me? :)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks,<br></blockquote><blockquote type="cite">-Hugues<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Fri, Mar 16, 2012 at 3:42 PM, Hugues Alary <hugues.alary@gmail.com>wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi everybody,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I'm configuring varnish to be used with my web application.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I need my backend to be able to give instructions to Varnish depending on<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">the page requested. For example, some of my pages contain ESI includes,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">some don't.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">I want my application to tell varnish wether or not do the esi<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">processing. This approach allows me to keep my VCL configuration file<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">abstracted from the application. I can then redistribute the VCL to other<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">users and let their application control the cache.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">So far my solution is to instruct varnish via HTTP headers.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">In my current example I set a header X-Application-DoEsi to 1 or 0. When<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">varnish receives the response from the backend, it looks for the value<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">of X-Application-DoEsi and does or not the ESI processing.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> - I was wondering if communicating with varnish via HTTP header is a<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> good solution?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> - How bad can it be performance wise?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> - Should I be worried about security (interception/modification of the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> communication between Varnish and the backend), even if no credential will<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> never be sent through HTTP headers? (Also, currently Varnish and the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> backend are on the same machine, but chances are that they will in the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> future not live on the same host).<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">In the future, I plan on instructing varnish not to cache certain pages<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">containing user defined query strings. I want the user to be able to<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">specify these un-cachable urls query strings directly in the application.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The application will then send the un-cachable query strings in a header<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">X-Application-QueryStringNoCache: "querystring1,querystring2,...".<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Is that a bad idea?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Thank you for your help!<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">--<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Hugues ALARY<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">Hugues ALARY<br></blockquote><blockquote type="cite">-------------- next part --------------<br></blockquote><blockquote type="cite">An HTML attachment was scrubbed...<br></blockquote><blockquote type="cite">URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120319/a5ee34d6/attachment-0001.html><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Message: 4<br></blockquote><blockquote type="cite">Date: Mon, 19 Mar 2012 17:11:57 -0700<br></blockquote><blockquote type="cite">From: Jeroen Ooms <jeroen.ooms@stat.ucla.edu><br></blockquote><blockquote type="cite">To: varnish-misc@varnish-cache.org<br></blockquote><blockquote type="cite">Subject: using the max-age request header<br></blockquote><blockquote type="cite">Message-ID:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><CABFfbXtVc3vMVB-7_vEUZW6fXup5zte6rVhwL7avsQdqHX1ZHQ@mail.gmail.com><br></blockquote><blockquote type="cite">Content-Type: text/plain; charset=ISO-8859-1<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">How do I configure my VLC to let Varnish respect the 'Cache-Control<br></blockquote><blockquote type="cite">max-age' request header? Someone on SO suggested the following:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">if (req.http.Cache-Control ~ '\bmax-age=\b`) {<br></blockquote><blockquote type="cite"> if (std.duration(regsub(req.http.Cache-Control,<br></blockquote><blockquote type="cite">".*\bmax-age=(\d+)\b.*", "\1s"), 0s) < obj.age) {<br></blockquote><blockquote type="cite"> return (pass);<br></blockquote><blockquote type="cite"> }<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">However, what I don't like about this is that vcl_pass does not<br></blockquote><blockquote type="cite">actually update the cache with the new entry. How can I configure it<br></blockquote><blockquote type="cite">so that when max age < obj.age, a fresh copy will be fetched and<br></blockquote><blockquote type="cite">inserted into cache?<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Message: 5<br></blockquote><blockquote type="cite">Date: Tue, 20 Mar 2012 07:25:05 +0100<br></blockquote><blockquote type="cite">From: Per Buer <perbu@varnish-software.com><br></blockquote><blockquote type="cite">To: Hugues Alary <hugues.alary@gmail.com><br></blockquote><blockquote type="cite">Cc: varnish-misc@varnish-cache.org<br></blockquote><blockquote type="cite">Subject: Re: Communication between Varnish and the Backend<br></blockquote><blockquote type="cite">Message-ID:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><CAOXZevDAcWRxDFbUA_mSh4_Hh2S1ukF9PGbmN6X2UThC-Md+5Q@mail.gmail.com><br></blockquote><blockquote type="cite">Content-Type: text/plain; charset="iso-8859-1"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Fri, Mar 16, 2012 at 11:42 PM, Hugues Alary <hugues.alary@gmail.com>wrote:<br></blockquote><blockquote type="cite">(..)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> - I was wondering if communicating with varnish via HTTP header is a<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> good solution?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Yes.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> - How bad can it be performance wise?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Negligible.<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> - Should I be worried about security (interception/modification of the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> communication between Varnish and the backend), even if no credential will<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> never be sent through HTTP headers? (Also, currently Varnish and the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> backend are on the same machine, but chances are that they will in the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"> future not live on the same host).<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite">It's more or less impossible to turn Varnish into an open proxy so I<br></blockquote><blockquote type="cite">wouldn't worry about that.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">In the future, I plan on instructing varnish not to cache certain pages<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">containing user defined query strings. I want the user to be able to<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">specify these un-cachable urls query strings directly in the application.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">The application will then send the un-cachable query strings in a header<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">X-Application-QueryStringNoCache: "querystring1,querystring2,...".<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Is that a bad idea?<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">No. If it works for you then go for it.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">-- <br></blockquote><blockquote type="cite">Per Buer, CEO<br></blockquote><blockquote type="cite">Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer<br></blockquote><blockquote type="cite">*Varnish makes websites fly!*<br></blockquote><blockquote type="cite">Whitepapers <http://www.varnish-software.com/whitepapers> |<br></blockquote><blockquote type="cite">Video<http://www.youtube.com/watch?v=x7t2Sp174eI> |<br></blockquote><blockquote type="cite">Twitter <https://twitter.com/varnishsoftware><br></blockquote><blockquote type="cite">-------------- next part --------------<br></blockquote><blockquote type="cite">An HTML attachment was scrubbed...<br></blockquote><blockquote type="cite">URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120320/59e9f0ef/attachment-0001.html><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Message: 6<br></blockquote><blockquote type="cite">Date: Tue, 20 Mar 2012 09:24:02 +0000<br></blockquote><blockquote type="cite">From: Michael Borejdo <mib@electronic-minds.de><br></blockquote><blockquote type="cite">To: "varnish-misc@varnish-cache.org" <varnish-misc@varnish-cache.org><br></blockquote><blockquote type="cite">Subject: Stale-While-Revalidate or Similar<br></blockquote><blockquote type="cite">Message-ID:<br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><BE4EDDBE2C55604EB9F3EBA421CB227A23971439@EM-MBX-1.electronic-minds.local><br></blockquote><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre"> </span><br></blockquote><blockquote type="cite">Content-Type: text/plain; charset="us-ascii"<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Hello List,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Is there support for something like "stale-while-revalidate" coming to Varnish?<br></blockquote><blockquote type="cite">I need to make the request to my backend-servers async and serve slightly stale content (defined by grace) and I do not want a user to wait for the backend at any time.<br></blockquote><blockquote type="cite">Or is there any other way with using vcl trickery to accomplish this?<br></blockquote><blockquote type="cite">(Unfortunately I cannot seem to find any info on this topic and the thread I found on the list has not been answered) [1]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">[1] https://www.varnish-cache.org/lists/pipermail/varnish-misc/2012-February/021644.html<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Michael<br></blockquote><blockquote type="cite">-------------- next part --------------<br></blockquote><blockquote type="cite">An HTML attachment was scrubbed...<br></blockquote><blockquote type="cite">URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120320/c76920a3/attachment.html><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">------------------------------<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">varnish-misc mailing list<br></blockquote><blockquote type="cite">varnish-misc@varnish-cache.org<br></blockquote><blockquote type="cite">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">End of varnish-misc Digest, Vol 72, Issue 21<br></blockquote><blockquote type="cite">********************************************<br></blockquote><br><br>http://www.bbc.co.uk/<br>This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.<br>If you have received it in error, please delete it from your system.<br>Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.<br>Please note that the BBC monitors e-mails sent or received.<br>Further communication will signify your consent to this.<br><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre"> </span><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120320/20e8c5c4/attachment-0001.html><br><br>------------------------------<br><br>Message: 2<br>Date: Tue, 20 Mar 2012 10:06:04 +0000<br>From: Michael Borejdo <mib@electronic-minds.de><br>To: "varnish-misc@varnish-cache.org" <varnish-misc@varnish-cache.org><br>Subject: Re: Stale-While-Revalidate or Similar<br>Message-ID:<br><span class="Apple-tab-span" style="white-space:pre"> </span><BE4EDDBE2C55604EB9F3EBA421CB227A2397145E@EM-MBX-1.electronic-minds.local><br><span class="Apple-tab-span" style="white-space:pre"> </span><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Hi there,<br><br><blockquote type="cite">There is a similar feature to this available in Varnish:<br></blockquote><blockquote type="cite">https://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html<br></blockquote><br>Unfortunately my servers are healthy (they do not send 5XX or the like), but are just slow as hell sometimes.<br>Or how is "health" "measured" by varnish?<br><br>I think this solution will not work for me, since my backend seems to be healthy. <br>What I basically want to accomplish is to prevent "the poor sod" from waiting for a request. Stale content is acceptable, waiting isn't.<br><br>Thanks<br><br>Michael<br><br>---------------------------------------------------------------<br>Von: varnish-misc-bounces@varnish-cache.org [mailto:varnish-misc-bounces@varnish-cache.org] Im Auftrag von Graham Lyons<br>Gesendet: Dienstag, 20. M?rz 2012 10:51<br>An: varnish-misc@varnish-cache.org<br>Betreff: Re: Stale-While-Revalidate or Similar<br><br>Hi Michael,<br><br>There is a similar feature to this available in Varnish:<br>https://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html<br><br>Grace and saint modes correspond roughly, respectively to stale-while-revalidate and stale-if-error proposed in RFC5861.<br><br>Graham.<br><br>On 20 Mar 2012, at 09:24, varnish-misc-request@varnish-cache.org wrote:<br><br><br>Send varnish-misc mailing list submissions to<br><span class="Apple-tab-span" style="white-space:pre"> </span>varnish-misc@varnish-cache.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br><span class="Apple-tab-span" style="white-space:pre"> </span>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc<br>or, via email, send a message with subject or body 'help' to<br><span class="Apple-tab-span" style="white-space:pre"> </span>varnish-misc-request@varnish-cache.org<br><br>You can reach the person managing the list at<br><span class="Apple-tab-span" style="white-space:pre"> </span>varnish-misc-owner@varnish-cache.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of varnish-misc digest..."<br><br><br>Today's Topics:<br><br>??1. Re: Varnish client IP address not display (MassiveScale.net)<br>??2. VUG5 Paris BOF (Jonathan Matthews)<br>??3. Re: Communication between Varnish and the Backend (Hugues Alary)<br>??4. using the max-age request header (Jeroen Ooms)<br>??5. Re: Communication between Varnish and the Backend (Per Buer)<br>??6. Stale-While-Revalidate or Similar (Michael Borejdo)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Mon, 19 Mar 2012 12:39:36 +0100<br>From: "MassiveScale.net" <info@massivescale.net><br>To: varnish-misc@varnish-cache.org<br>Subject: Re: Varnish client IP address not display<br>Message-ID: <4F671AF8.3060201@massivescale.net><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>On 03/19/2012 09:02 AM, Stewart Robinson wrote:<br><br>Jewel,<br>What header are you checking on the back end?<br>You should be reading the x-forwarded-for header rather than some form<br>of remote_addr.<br><br>Alternatively, if your backend server is Apache, you could use mod_rpaf<br>http://stderr.net/apache/rpaf/<br><br>-- <br>Andrzej Godziuk<br>http://MassiveScale.net/<br><br><br><br>------------------------------<br><br>Message: 2<br>Date: Mon, 19 Mar 2012 13:25:22 +0000<br>From: Jonathan Matthews <contact@jpluscplusm.com><br>To: varnish-misc@varnish-cache.org<br>Subject: VUG5 Paris BOF<br>Message-ID:<br><span class="Apple-tab-span" style="white-space:pre"> </span><CAKsTx7Dv1rf62dJ6XYMo0n+vcB02nP7fyxX9CcPaPw2KbHUD-Q@mail.gmail.com><br>Content-Type: text/plain; charset=UTF-8<br><br>Hi all -<br><br>I'm heading along to VUG5 this week - really looking forward to<br>meeting a lot of you and seeing how you're using and abusing our<br>favourite tool :-)<br><br>When I signed up, I don't recall ticking the "BOF" checkbox - could<br>anyone let me know if it's too late to get in on that action?<br><br>Either way, are people (like me) who are attending *just* the user day<br>(Thursday) perhaps looking for more Varnish chat on the Friday or the<br>weekend? I'm there 'til Sunday, and would love to get the most out of<br>a high concentration of Varnish-literate folk!<br><br>All the best,<br>Jonathan<br>-- <br>Jonathan Matthews<br>London, Oxford, UK<br>http://www.jpluscplusm.com/contact.html<br><br><br><br>------------------------------<br><br>Message: 3<br>Date: Mon, 19 Mar 2012 12:50:23 -0700<br>From: Hugues Alary <hugues.alary@gmail.com><br>To: varnish-misc@varnish-cache.org<br>Subject: Re: Communication between Varnish and the Backend<br>Message-ID:<br><span class="Apple-tab-span" style="white-space:pre"> </span><CAN-YAk8S=dCxUXR5GbyC3+s3oSgis0+doetcw0N8QUGPJ1Mteg@mail.gmail.com><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>Happy Monday everybody,<br><br>Nobody, got some good advices for me? :)<br><br>Thanks,<br>-Hugues<br><br>On Fri, Mar 16, 2012 at 3:42 PM, Hugues Alary <hugues.alary@gmail.com>wrote:<br><br><br>Hi everybody,<br><br>I'm configuring varnish to be used with my web application.<br><br>I need my backend to be able to give instructions to Varnish depending on<br>the page requested. For example, some of my pages contain ESI includes,<br>some don't.<br><br>I want my application to tell varnish wether or not do the esi<br>processing. This approach allows me to keep my VCL configuration file<br>abstracted from the application. I can then redistribute the VCL to other<br>users and let their application control the cache.<br><br>So far my solution is to instruct varnish via HTTP headers.<br><br>In my current example I set a header X-Application-DoEsi to 1 or 0. When<br>varnish receives the response from the backend, it looks for the value<br>of X-Application-DoEsi and does or not the ESI processing.<br><br>??- I was wondering if communicating with varnish via HTTP header is a<br>??good solution?<br>??- How bad can it be performance wise?<br>??- Should I be worried about security (interception/modification of the<br>??communication between Varnish and the backend), even if no credential will<br>??never be sent through HTTP headers? (Also, currently Varnish and the<br>??backend are on the same machine, but chances are that they will in the<br>??future not live on the same host).<br><br>In the future, I plan on instructing varnish not to cache certain pages<br>containing user defined query strings. I want the user to be able to<br>specify these un-cachable urls query strings directly in the application.<br>The application will then send the un-cachable query strings in a header<br>X-Application-QueryStringNoCache: "querystring1,querystring2,...".<br><br>Is that a bad idea?<br><br>Thank you for your help!<br><br>--<br>Hugues ALARY<br><br><br><br><br>-- <br>Hugues ALARY<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120319/a5ee34d6/attachment-0001.html><br><br>------------------------------<br><br>Message: 4<br>Date: Mon, 19 Mar 2012 17:11:57 -0700<br>From: Jeroen Ooms <jeroen.ooms@stat.ucla.edu><br>To: varnish-misc@varnish-cache.org<br>Subject: using the max-age request header<br>Message-ID:<br><span class="Apple-tab-span" style="white-space:pre"> </span><CABFfbXtVc3vMVB-7_vEUZW6fXup5zte6rVhwL7avsQdqHX1ZHQ@mail.gmail.com><br>Content-Type: text/plain; charset=ISO-8859-1<br><br>How do I configure my VLC to let Varnish respect the 'Cache-Control<br>max-age' request header? Someone on SO suggested the following:<br><br>if (req.http.Cache-Control ~ '\bmax-age=\b`) {<br>???if (std.duration(regsub(req.http.Cache-Control,<br>".*\bmax-age=(\d+)\b.*", "\1s"), 0s) < obj.age) {<br>???????return (pass);<br>???}<br>}<br><br>However, what I don't like about this is that vcl_pass does not<br>actually update the cache with the new entry. How can I configure it<br>so that when max age < obj.age, a fresh copy will be fetched and<br>inserted into cache?<br><br><br><br>------------------------------<br><br>Message: 5<br>Date: Tue, 20 Mar 2012 07:25:05 +0100<br>From: Per Buer <perbu@varnish-software.com><br>To: Hugues Alary <hugues.alary@gmail.com><br>Cc: varnish-misc@varnish-cache.org<br>Subject: Re: Communication between Varnish and the Backend<br>Message-ID:<br><span class="Apple-tab-span" style="white-space:pre"> </span><CAOXZevDAcWRxDFbUA_mSh4_Hh2S1ukF9PGbmN6X2UThC-Md+5Q@mail.gmail.com><br>Content-Type: text/plain; charset="iso-8859-1"<br><br>On Fri, Mar 16, 2012 at 11:42 PM, Hugues Alary <hugues.alary@gmail.com>wrote:<br>(..)<br><br><br><br>??- I was wondering if communicating with varnish via HTTP header is a<br>??good solution?<br><br>Yes.<br><br><br><br>??- How bad can it be performance wise?<br><br>Negligible.<br><br><br><br><br>??- Should I be worried about security (interception/modification of the<br>??communication between Varnish and the backend), even if no credential will<br>??never be sent through HTTP headers? (Also, currently Varnish and the<br>??backend are on the same machine, but chances are that they will in the<br>??future not live on the same host).<br><br><br>It's more or less impossible to turn Varnish into an open proxy so I<br>wouldn't worry about that.<br><br><br><br><br><br>In the future, I plan on instructing varnish not to cache certain pages<br>containing user defined query strings. I want the user to be able to<br>specify these un-cachable urls query strings directly in the application.<br>The application will then send the un-cachable query strings in a header<br>X-Application-QueryStringNoCache: "querystring1,querystring2,...".<br><br>Is that a bad idea?<br><br><br>No. If it works for you then go for it.<br><br><br>-- <br>Per Buer, CEO<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer<br>*Varnish makes websites fly!*<br>Whitepapers <http://www.varnish-software.com/whitepapers> |<br>Video<http://www.youtube.com/watch?v=x7t2Sp174eI> |<br>Twitter <https://twitter.com/varnishsoftware><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120320/59e9f0ef/attachment-0001.html><br><br>------------------------------<br><br>Message: 6<br>Date: Tue, 20 Mar 2012 09:24:02 +0000<br>From: Michael Borejdo <mib@electronic-minds.de><br>To: "varnish-misc@varnish-cache.org" <varnish-misc@varnish-cache.org><br>Subject: Stale-While-Revalidate or Similar<br>Message-ID:<br><span class="Apple-tab-span" style="white-space:pre"> </span><BE4EDDBE2C55604EB9F3EBA421CB227A23971439@EM-MBX-1.electronic-minds.local><br><span class="Apple-tab-span" style="white-space:pre"> </span><br>Content-Type: text/plain; charset="us-ascii"<br><br>Hello List,<br><br>Is there support for something like "stale-while-revalidate" coming to Varnish?<br>I need to make the request to my backend-servers async and serve slightly stale content (defined by grace) and I do not want a user to wait for the backend at any time.<br>Or is there any other way with using vcl trickery to accomplish this?<br>(Unfortunately I cannot seem to find any info on this topic and the thread I found on the list has not been answered) ?[1]<br><br>[1] https://www.varnish-cache.org/lists/pipermail/varnish-misc/2012-February/021644.html<br><br>Thanks<br><br>Michael<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120320/c76920a3/attachment.html><br><br>------------------------------<br><br>_______________________________________________<br>varnish-misc mailing list<br>varnish-misc@varnish-cache.org<br>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc<br><br>End of varnish-misc Digest, Vol 72, Issue 21<br>********************************************<br><br>?<br><br>http://www.bbc.co.uk<br>This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.<br>If you have received it in error, please delete it from your system.<br>Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.<br>Please note that the BBC monitors e-mails sent or received.<br>Further communication will signify your consent to this. <br><br><br><br>------------------------------<br><br>_______________________________________________<br>varnish-misc mailing list<br>varnish-misc@varnish-cache.org<br>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc<br><br>End of varnish-misc Digest, Vol 72, Issue 22<br>********************************************<br></div></blockquote></div><br></div></div><DIV> </DIV><br/><font size="3" face="Times New Roman"><a href="http://www.bbc.co.uk">http://www.bbc.co.uk</a><br/>This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.<br/>If you have received it in error, please delete it from your system.<br/>Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.<br/>Please note that the BBC monitors e-mails sent or received.<br/>Further communication will signify your consent to this.</font>
</body></html>