From jfrias at gmail.com Tue Sep 1 02:58:50 2009 From: jfrias at gmail.com (Javier Frias) Date: Mon, 31 Aug 2009 22:58:50 -0400 Subject: Saint mode Message-ID: <22964b960908311958r211f8ac9g1b6eee46ed92d158@mail.gmail.com> Can I achieve the same thing as "saint mode" on varnish 2.0.4? If not, when will there be a release with this feature? Specifically, we are looking to not store bad documents unless we have to, iow, not replace a known good document ( status 200 or 404 ), with a bad document ( status 503 ), if it would otherwise would be served from grace. Saint Mode Change Set: http://varnish.projects.linpro.no/changeset/4208 if (beresp.status == 500) { set beresp.saintmode = 20s; restart; } -Javier -------------- next part -------------- An HTML attachment was scrubbed... URL: From phk at phk.freebsd.dk Tue Sep 1 08:58:21 2009 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Tue, 01 Sep 2009 08:58:21 +0000 Subject: Saint mode In-Reply-To: Your message of "Mon, 31 Aug 2009 22:58:50 -0400." <22964b960908311958r211f8ac9g1b6eee46ed92d158@mail.gmail.com> Message-ID: <47314.1251795501@critter.freebsd.dk> In message <22964b960908311958r211f8ac9g1b6eee46ed92d158 at mail.gmail.com>, Javie r Frias writes: >Specifically, we are looking to not store bad documents unless we have to, >iow, not replace a known good document ( status 200 or 404 ), with a bad >document ( status 503 ), if it would otherwise would be served from grace. 503's are never cached to my knowledge. the rest can be obtained by: sub vcl_fetch { if (beresp.status != 200 && beresp.status != 404) { set beresp.ttl = 0; return (pass); } } -- 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. From stockrt at gmail.com Tue Sep 1 14:44:38 2009 From: stockrt at gmail.com (=?ISO-8859-1?Q?Rog=E9rio_Schneider?=) Date: Tue, 1 Sep 2009 11:44:38 -0300 Subject: Saint mode In-Reply-To: <47314.1251795501@critter.freebsd.dk> References: <22964b960908311958r211f8ac9g1b6eee46ed92d158@mail.gmail.com> <47314.1251795501@critter.freebsd.dk> Message-ID: <100657c90909010744r208ecec1t6eee4ee0cc407cc6@mail.gmail.com> I believe this functionality is great and I think in start using it. We have this need to continue serving correct (!= 5xx) documents if they are cached and the backend responses are in that range of failure codes. This patch appears to solve this need. I also believe it is correlated to http://varnish.projects.linpro.no/ticket/369 Best regards, > -- Rog?rio Schneider MSN: stockrt at hotmail.com GTalk: stockrt at gmail.com TerraVoip: stockrt Skype: stockrt http://stockrt.github.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jfrias at gmail.com Tue Sep 1 17:35:43 2009 From: jfrias at gmail.com (Javier Frias) Date: Tue, 1 Sep 2009 13:35:43 -0400 Subject: Saint mode In-Reply-To: <47314.1251795501@critter.freebsd.dk> References: <22964b960908311958r211f8ac9g1b6eee46ed92d158@mail.gmail.com> <47314.1251795501@critter.freebsd.dk> Message-ID: <22964b960909011035y10159263j1a82751ccb592db6@mail.gmail.com> On Tue, Sep 1, 2009 at 4:58 AM, Poul-Henning Kamp wrote: > > > > 503's are never cached to my knowledge. > > the rest can be obtained by: > > sub vcl_fetch { > if (beresp.status != 200 && beresp.status != 404) { > set beresp.ttl = 0; > return (pass); > } > } > > So my setup is a bit different, since I'm one of those that want to server stuff pass the grace period, if my backends are down. I also want to protect myself against a self inflicted DoS due to errors. So ideally, saint mode is what i'd like ( ie, dont store this unless you are a better result ) here's the pertinent configs... sub vcl_recv { .... # even though an object may be expired, we want to serve it up for this long to prevent thread pile up # we also want to be somewhat aggresive if the backend is up(healthy) if (req.backend.healthy) { set req.grace = 5m; } else { set req.grace = 600m; } ... } sub vcl_fetch { # here, we cache for more time codes that are not server errors if ( obj.status <500) { set obj.grace = 600m; set obj.ttl = 600s; set obj.cacheable = true; } else { set obj.grace = 5s; set obj.ttl = 60s; set obj.cacheable = true; } } Before, i use to just have a blanket vcl_fetch setting my grace and ttl, which is probably the reason why i was caching the 500's -Javier -------------- next part -------------- An HTML attachment was scrubbed... URL: From stockrt at gmail.com Wed Sep 2 03:05:08 2009 From: stockrt at gmail.com (=?ISO-8859-1?Q?Rog=E9rio_Schneider?=) Date: Wed, 2 Sep 2009 00:05:08 -0300 Subject: behaviour when client drops the connection? In-Reply-To: <4A9B2345.3030402@vuw.ac.nz> References: <4A9B2345.3030402@vuw.ac.nz> Message-ID: <100657c90909012005x74cfb04dhd08908e17744e955@mail.gmail.com> Stuart, I think 60 minutes is too much time even for Varnish to wait. In default configuration Varnish would wait only for, if I remember, 60 seconds and then give up on that request. This can be tuned with -p params, like "first_byte_timeout". You can read more here: http://varnish.projects.linpro.no/browser/trunk/varnish-cache/bin/varnishd/mgt_param.c Best Regards, On Sun, Aug 30, 2009 at 10:11 PM, stuart yeates wrote: > Hello > > I'm looking to use varnish in front of an XSLT/PostgreSQL/Tomcat/Java > site and have a question about varnish's behaviour when a client drops a > connection. > > The problem is that there are a relatively small number of pages which > are _very_ slow to generate (>60 minutes) and a large number that are > relatively fast. Clients tend to abort the slow pages, so (using our > current reverse proxy) they never make it into the cache. > > Ideally I'd like to make varnish continue the request and cache the > result. Is that possible? > > Is there a way to make these slow-to-generate pages have a much longer > cache-time? > > cheers > stuart > > -- > Stuart Yeates > http://www.nzetc.org/ New Zealand Electronic Text Centre > http://researcharchive.vuw.ac.nz/ Institutional Repository > _______________________________________________ > varnish-misc mailing list > varnish-misc at projects.linpro.no > http://projects.linpro.no/mailman/listinfo/varnish-misc > -- Rog?rio Schneider MSN: stockrt at hotmail.com GTalk: stockrt at gmail.com TerraVoip: stockrt Skype: stockrt http://stockrt.github.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From rob.halff at gmail.com Wed Sep 2 07:15:22 2009 From: rob.halff at gmail.com (Rob Halff) Date: Wed, 2 Sep 2009 09:15:22 +0200 Subject: behaviour when client drops the connection? In-Reply-To: <100657c90909012005x74cfb04dhd08908e17744e955@mail.gmail.com> References: <4A9B2345.3030402@vuw.ac.nz> <100657c90909012005x74cfb04dhd08908e17744e955@mail.gmail.com> Message-ID: Stuart, pages taking 1 hour to load is an application design problem. You should use http to show results not to trigger a one hour request and let the user/client wait for it. You could generate a code instantly to confirm the request is being processed. And let the client check, using this code, whether the request is done every minute or whatever time interval you choose. If the request is not based on user parameters, you could use cron to generate the result page. Gr. Rob Halff 2009/9/2 Rog?rio Schneider : > Stuart, I think 60 minutes is too much time even for Varnish to wait. > In default configuration Varnish would wait only for, if I remember, 60 > seconds and then give up on that request. > > This can be tuned with -p params, like "first_byte_timeout". You can read > more here: > > http://varnish.projects.linpro.no/browser/trunk/varnish-cache/bin/varnishd/mgt_param.c > > Best Regards, > > On Sun, Aug 30, 2009 at 10:11 PM, stuart yeates > wrote: >> >> Hello >> >> I'm looking to use varnish in front of an XSLT/PostgreSQL/Tomcat/Java >> site and have a question about varnish's behaviour when a client drops a >> connection. >> >> The problem is that there are a relatively small number of pages which >> are _very_ slow to generate (>60 minutes) and a large number that are >> relatively fast. Clients tend to abort the slow pages, so (using our >> current reverse proxy) they never make it into the cache. >> >> Ideally I'd like to make varnish continue the request and cache the >> result. Is that possible? >> >> Is there a way to make these slow-to-generate pages have a much longer >> cache-time? >> >> cheers >> stuart >> >> -- >> Stuart Yeates >> http://www.nzetc.org/ ? ? ? New Zealand Electronic Text Centre >> http://researcharchive.vuw.ac.nz/ ? ? Institutional Repository >> _______________________________________________ >> varnish-misc mailing list >> varnish-misc at projects.linpro.no >> http://projects.linpro.no/mailman/listinfo/varnish-misc > > > -- > Rog?rio Schneider > > MSN: stockrt at hotmail.com > GTalk: stockrt at gmail.com > TerraVoip: stockrt > Skype: stockrt > http://stockrt.github.com > > _______________________________________________ > varnish-dev mailing list > varnish-dev at projects.linpro.no > http://projects.linpro.no/mailman/listinfo/varnish-dev > > From kristian at redpill-linpro.com Wed Sep 2 12:53:18 2009 From: kristian at redpill-linpro.com (Kristian Lyngstol) Date: Wed, 2 Sep 2009 14:53:18 +0200 Subject: Saint mode In-Reply-To: <22964b960908311958r211f8ac9g1b6eee46ed92d158@mail.gmail.com> References: <22964b960908311958r211f8ac9g1b6eee46ed92d158@mail.gmail.com> Message-ID: <20090902125318.GA17535@kjeks.linpro.no> On Mon, Aug 31, 2009 at 10:58:50PM -0400, Javier Frias wrote: > Can I achieve the same thing as "saint mode" on varnish 2.0.4? If not, when > will there be a release with this feature? No, you can't. I expect it to be in 2.1 which is to be released shortly, we just need to get persistence working and stable. -- Kristian Lyngst?l Redpill Linpro AS Tlf: +47 21544179 Mob: +47 99014497 -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: From Olivier.Nicole at cs.ait.ac.th Thu Sep 3 03:14:25 2009 From: Olivier.Nicole at cs.ait.ac.th (Olivier Nicole) Date: Thu, 3 Sep 2009 10:14:25 +0700 (ICT) Subject: Ban headers in the messages send to the list Message-ID: <200909030314.n833EPKU009542@banyan.cs.ait.ac.th> Hi, It seems that (some of) the messages sent to varnish-dev list have a duplicated MIME-Version: header. This causes the message to be quarantined by Amavisd-new. It may affect other users f the list. Below is an example of the headers. Best regards, Olivier X-Coding-System: undecided-unix Mail-from: From jfrias at gmail.com Thu Sep 03 09:58:15 2009 Return-Path: <> Delivered-To: bad-header-quarantine X-Envelope-From: X-Envelope-To: X-Envelope-To-Blocked: X-Quarantine-ID: X-Amavis-Alert: BAD HEADER SECTION Duplicate header field: "MIME-Version" Received: from mail.cs.ait.ac.th ([127.0.0.1]) by localhost (mail.cs.ait.ac.th [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DpOv5pOzCgAp for ; Tue, 1 Sep 2009 10:46:07 +0700 (ICT) X-Greylist: delayed 1283 seconds by postgrey-1.32 at mail.cs.ait.ac.th; Tue, 01 Sep 2009 10:46:06 ICT Received: from projects.linpro.no (projects.linpro.no [87.238.49.148]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.cs.ait.ac.th (Postfix) with ESMTPS id C27D63A3853 for ; Tue, 1 Sep 2009 10:46:06 +0700 (ICT) Received: from projects.linpro.no (localhost [127.0.0.1]) by projects.linpro.no (Postfix) with ESMTP id 050BA1F7343; Tue, 1 Sep 2009 05:24:39 +0200 (CEST) X-Original-To: varnish-dev at projects.linpro.no Delivered-To: varnish-dev at projects.linpro.no Received: from localhost (localhost [127.0.0.1]) by projects.linpro.no (Postfix) with ESMTP id 393311F733F for ; Tue, 1 Sep 2009 05:24:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at projects.linpro.no Received: from projects.linpro.no ([127.0.0.1]) by localhost (projects.linpro.no [87.238.49.148]) (amavisd-new, port 10024) with ESMTP id RsE-dh1azkWg for ; Tue, 1 Sep 2009 05:24:30 +0200 (CEST) X-Greylist: delayed 1538 seconds by postgrey-1.27 at projects; Tue, 01 Sep 2009 05:24:30 CEST Received: from mail-gx0-f206.google.com (mail-gx0-f206.google.com [209.85.217.206]) by projects.linpro.no (Postfix) with ESMTP for ; Tue, 1 Sep 2009 05:24:29 +0200 (CEST) Received: by gxk2 with SMTP id 2so6124197gxk.7 for ; Mon, 31 Aug 2009 20:24:29 -0700 (PDT) >>> MIME-Version: 1.0 Received: by 10.151.86.12 with SMTP id o12mr4760716ybl.94.1251773930984; Mon, 31 Aug 2009 19:58:50 -0700 (PDT) Date: Mon, 31 Aug 2009 22:58:50 -0400 Message-ID: <22964b960908311958r211f8ac9g1b6eee46ed92d158 at mail.gmail.com> Subject: Saint mode From: Javier Frias To: varnish-dev X-BeenThere: varnish-dev at projects.linpro.no X-Mailman-Version: 2.1.9 Precedence: list List-Id: "Discussions regarding Varnish development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2007422974==" >>> Mime-version: 1.0 Sender: varnish-dev-bounces at projects.linpro.no Errors-To: varnish-dev-bounces at projects.linpro.no From bob.t.terminal at gmail.com Mon Sep 14 21:00:22 2009 From: bob.t.terminal at gmail.com (Bob T. Terminal) Date: Mon, 14 Sep 2009 16:00:22 -0500 Subject: external auth from request header values Message-ID: Former squid user looking at trying to transition to Varnish. Trying to setup an auth check for incoming requests that would look at the request headers cookie and pass values to a mysql server for authentication. Currently have a external application which can handle this, what is the best way to go about calling this external app within Varnish for the authentication check? (Squid refereed to this as an external acl helper) if there is a better solution please point me in the right direction Thanks Bob From phk at phk.freebsd.dk Thu Sep 24 14:23:08 2009 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Thu, 24 Sep 2009 14:23:08 +0000 Subject: [PATCH] Fix typo in esi diagnostic In-Reply-To: Your message of "Thu, 20 Aug 2009 20:05:20 +0200." <591B5DF8-A755-40F2-9677-BE0D3614F6F8@dwim.org> Message-ID: <11034.1253802188@critter.freebsd.dk> Sorry about the delay, your email had gotten sorted into the "later" mailbox. It's fixed now, thanks for noticing. Poul-Henning In message <591B5DF8-A755-40F2-9677-BE0D3614F6F8 at dwim.org>, "Jos I. Boumans" wr ites: >Greetings, > >While browsing the source, I came a cross a small typo. Patch below sig. > >Cheers, > >-- > > Jos Boumans > > "Whenever you find you are on the side of the majority, > it is time to pause and reflect." - Mark Twain > >Index: varnish-cache/bin/varnishd/cache_esi.c >=================================================================== >--- varnish-cache/bin/varnishd/cache_esi.c (revision 4207) >+++ varnish-cache/bin/varnishd/cache_esi.c (working copy) >@@ -370,7 +370,7 @@ > continue; > if (Tlen(val) == 0) { > esi_error(ew, tag.b, Tlen(tag), >- "ESI esi:include src attribute withou >value"); >+ "ESI esi:include src attribute without >value"); > continue; > } > > > >_______________________________________________ >varnish-dev mailing list >varnish-dev at projects.linpro.no >http://projects.linpro.no/mailman/listinfo/varnish-dev > -- 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. From yuri.linux at gmail.com Tue Sep 8 16:12:35 2009 From: yuri.linux at gmail.com (Yuri) Date: Tue, 08 Sep 2009 16:12:35 -0000 Subject: about vcl Message-ID: <4aa68089.141bf30a.4f58.0849@mx.google.com> Hi Everybody, I have carried out step by step in the Chinese translation of these documents, Obviously the level of my English is not very good, so some elements with doubt. may you explain them by straightforward statement. In VCL->Syntax overview "* Assignments are introduced with the set keyword. There are no user-defined variables; values can only be assigned to variables attached to backend, request or document objects. Most of these are typed, and the values assigned to them must have a compatible unit suffix." This paragraph I thought about it for a long time did not fully understand. --Yuri Thanks and Blessing _____ -------------- next part -------------- An HTML attachment was scrubbed... URL: