From pablort at gmail.com Sat Jan 8 14:58:20 2011 From: pablort at gmail.com (Pablo Borges) Date: Sat, 8 Jan 2011 12:58:20 -0200 Subject: Elaborating on proposed vcl_stale() and vcl_refresh() // Proposal/specs for backend conditional requests / aka "GET If-Modified-Since" (GET IMS)) In-Reply-To: <4CA9D7DC.1070000@schokola.de> References: <4C9B2BBE.5060309@schokola.de> <4CA9D7DC.1070000@schokola.de> Message-ID: Hey guys, Could this be one topic for VUG3 ? :D Cheers, On Mon, Oct 4, 2010 at 10:34 AM, Nils Goroll wrote: > Hi, > > I've had a first discussion with phk on IRC. IIUC, his main concern was > that > introducing the new states & VCL procedures would increase complexity and > raise > the entry barrier, in particular with regard to users wanting to (easily) > customize the default vcl. > > I will elaborate on the reasons for the proposed solution. > > a) vcl_stale() > -------------- > > The alternative we've discussed on IRC is to fall into vcl_miss(): If an > obj > eligible for refresh was found, default backend conditional request headers > were > added to bereq, and vcl_miss() would see obj. It wouldn't for the current > case > (a real miss). To avoid a backend conditional request, admins could remove > the > conditional headers (If-...) from bereq. return(refresh) wouldn't exist. > > Here's my subjective perspective on why vcl_stale() would make sense: > > - Without vcl_stale(), the semantics of vcl_miss() would mean "I have not > found > an object eligible for delivery, but might have found one for refresh", > which > I believe will confuse users more than help. > > Mostly, this does open up a whole lot of oddities and questions: > > - vcl_miss would see obj only if it was a "stale miss" > > Odd: What would obj.status return for a "real miss"? > > - cnt_miss could prepare bereq.http.If-... headers only if it was a "stale > miss" > > - We would be able to return (deliver) for a "stale miss", but not for a > real > miss: What do we do here? We can't decide on the correctness of the VCL > at compile time. Would return (deliver) fall back to a return (fetch) > is it's a "real miss"? > > - Users would need to put more conditionals into vcl_miss for special > handling > of "stale" cases, ? la: > > if (obj) { > # do stale case handling > } else { > # existing code > } > > Depending on whether we want to default to the new or current behavior, a > default vcl_stale() would look like: > > vcl_stale() { > return (refresh); > } > > or > > vcl_stale() { > call vcl_miss; > } > > > > If we put the mechanics into vcl_miss, retaining current behavior would > need > something like this with a full backend conditional: > > vcl_miss() { > if (obj) { > unset bereq.http.If-Match; > unset bereq.http.If-Modified-Since; > unset bereq.http.If-None-Match; > unset bereq.http.If-Range; > unset bereq.http.If-Unmodified-Since; > } > } > > > My personal impression is that vcl_stale would help retain clarity rather > than > complicate things, in particular because it would help to limit additional > processing to the cases when it's actually needed. > > b) vcl_refresh() > ---------------- > > The alternative to vcl_refresh() would be to put additional logic into > vcl_fetch(). > > Similar to the stale case, we would want to have access to the original > object > in the cache and the beresp from the refresh, so obj would be available > only if > vcl_refresh was entered with (beresp.status == 304). > > > > We really want to retain clarity and not introduce unneeded additional > complexity. I believe that introducing more VCL states and procedures would > help > to achieve this, in particular because the preconditions for each case were > clear and visibility of a cache object was well defined. > > Thanks, Nils > > _______________________________________________ > varnish-dev mailing list > varnish-dev at varnish-cache.org > http://lists.varnish-cache.org/mailman/listinfo/varnish-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From phk at phk.freebsd.dk Sat Jan 8 19:44:47 2011 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sat, 08 Jan 2011 19:44:47 +0000 Subject: Elaborating on proposed vcl_stale() and vcl_refresh() // Proposal/specs for backend conditional requests / aka "GET If-Modified-Since" (GET IMS)) In-Reply-To: Your message of "Sat, 08 Jan 2011 12:58:20 -0200." Message-ID: <60087.1294515887@critter.freebsd.dk> In message , Pabl o Borges writes: >Could this be one topic for VUG3 ? :D Put it on the wiki and it will be... Poul-Henning > >Cheers, > >On Mon, Oct 4, 2010 at 10:34 AM, Nils Goroll wrote: > >> Hi, >> >> I've had a first discussion with phk on IRC. IIUC, his main concern was >> that >> introducing the new states & VCL procedures would increase complexity and >> raise >> the entry barrier, in particular with regard to users wanting to (easily) >> customize the default vcl. >> >> I will elaborate on the reasons for the proposed solution. >> >> a) vcl_stale() >> -------------- >> >> The alternative we've discussed on IRC is to fall into vcl_miss(): If an >> obj >> eligible for refresh was found, default backend conditional request heade= >rs >> were >> added to bereq, and vcl_miss() would see obj. It wouldn't for the current >> case >> (a real miss). To avoid a backend conditional request, admins could remov= >e >> the >> conditional headers (If-...) from bereq. return(refresh) wouldn't exist. >> >> Here's my subjective perspective on why vcl_stale() would make sense: >> >> - Without vcl_stale(), the semantics of vcl_miss() would mean "I have not >> found >> an object eligible for delivery, but might have found one for refresh", >> which >> I believe will confuse users more than help. >> >> Mostly, this does open up a whole lot of oddities and questions: >> >> - vcl_miss would see obj only if it was a "stale miss" >> >> Odd: What would obj.status return for a "real miss"? >> >> - cnt_miss could prepare bereq.http.If-... headers only if it was a "sta= >le >> miss" >> >> - We would be able to return (deliver) for a "stale miss", but not for a >> real >> miss: What do we do here? We can't decide on the correctness of the VC= >L >> at compile time. Would return (deliver) fall back to a return (fetch) >> is it's a "real miss"? >> >> - Users would need to put more conditionals into vcl_miss for special >> handling >> of "stale" cases, =E0 la: >> >> if (obj) { >> # do stale case handling >> } else { >> # existing code >> } >> >> Depending on whether we want to default to the new or current behavior, a >> default vcl_stale() would look like: >> >> vcl_stale() { >> return (refresh); >> } >> >> or >> >> vcl_stale() { >> call vcl_miss; >> } >> >> >> >> If we put the mechanics into vcl_miss, retaining current behavior would >> need >> something like this with a full backend conditional: >> >> vcl_miss() { >> if (obj) { >> unset bereq.http.If-Match; >> unset bereq.http.If-Modified-Since; >> unset bereq.http.If-None-Match; >> unset bereq.http.If-Range; >> unset bereq.http.If-Unmodified-Since; >> } >> } >> >> >> My personal impression is that vcl_stale would help retain clarity rather >> than >> complicate things, in particular because it would help to limit additiona= >l >> processing to the cases when it's actually needed. >> >> b) vcl_refresh() >> ---------------- >> >> The alternative to vcl_refresh() would be to put additional logic into >> vcl_fetch(). >> >> Similar to the stale case, we would want to have access to the original >> object >> in the cache and the beresp from the refresh, so obj would be available >> only if >> vcl_refresh was entered with (beresp.status =3D=3D 304). >> >> >> >> We really want to retain clarity and not introduce unneeded additional >> complexity. I believe that introducing more VCL states and procedures wou= >ld >> help >> to achieve this, in particular because the preconditions for each case we= >re >> clear and visibility of a cache object was well defined. >> >> Thanks, Nils >> >> _______________________________________________ >> varnish-dev mailing list >> varnish-dev at varnish-cache.org >> http://lists.varnish-cache.org/mailman/listinfo/varnish-dev >> > >--0016362841567a3345049956f881 >Content-Type: text/html; charset=ISO-8859-1 >Content-Transfer-Encoding: quoted-printable > >Hey guys,

Could this be one topic for VUG3 ? :D

Cheers,
r>
On Mon, Oct 4, 2010 at 10:34 AM, Nils Goroll <= >span dir=3D"ltr"><slink at schokola.de= >> wrote:
> >
r-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,
>
>I've had a first discussion with phk on IRC. IIUC, his main concern was= > that
>introducing the new states & VCL procedures would increase complexity a= >nd raise
>the entry barrier, in particular with regard to users wanting to (easily)r> >customize the default vcl.
>
>I will elaborate on the reasons for the proposed solution.
>
>a) vcl_stale()
>--------------
>
>The alternative we've discussed on IRC is to fall into vcl_miss(): If a= >n obj
>eligible for refresh was found, default backend conditional request headers= > were
>added to bereq, and vcl_miss() would see obj. It wouldn't for the curre= >nt case
>(a real miss). To avoid a backend conditional request, admins could remove = >the
>conditional headers (If-...) from bereq. return(refresh) wouldn't exist= >.
>
>Here's my subjective perspective on why vcl_stale() would make sense:r> >
>- Without vcl_stale(), the semantics of vcl_miss() would mean "I have = >not found
> =A0an object eligible for delivery, but might have found one for refresh&q= >uot;, which
> =A0I believe will confuse users more than help.
>
> =A0Mostly, this does open up a whole lot of oddities and questions:
>
> =A0- vcl_miss would see obj only if it was a "stale miss"
>
> =A0 =A0Odd: What would obj.status return for a "real miss"?
>
> =A0- cnt_miss could prepare bereq.http.If-... headers only if it was a &qu= >ot;stale
> =A0 =A0miss"
>
> =A0- We would be able to return (deliver) for a "stale miss", bu= >t not for a real
> =A0 =A0miss: What do we do here? We can't decide on the correctness of= > the VCL
> =A0 =A0at compile time. Would return (deliver) fall back to a return (fetc= >h)
> =A0 =A0is it's a "real miss"?
>
>- Users would need to put more conditionals into vcl_miss for special handl= >ing
> =A0of "stale" cases, =E0 la:
>
> =A0if (obj) {
> =A0 =A0 =A0 =A0# do stale case handling
> =A0} else {
> =A0 =A0 =A0 =A0# existing code
> =A0}
>
>Depending on whether we want to default to the new or current behavior, ar> >default vcl_stale() would look like:
>
>vcl_stale() {
> =A0 =A0 =A0 =A0return (refresh);
>}
>
>or
>
>vcl_stale() {
> =A0 =A0 =A0 =A0call vcl_miss;
>}
>
>
>
>If we put the mechanics into vcl_miss, retaining current behavior would nee= >d
>something like this with a full backend conditional:
>
>vcl_miss() {
> =A0 =A0 =A0 =A0if (obj) {
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unset bereq.http.If-Match;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unset bereq.http.If-Modified-Since;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unset bereq.http.If-None-Match;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unset bereq.http.If-Range;
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0unset bereq.http.If-Unmodified-Since;
> =A0 =A0 =A0 =A0}
>}
>
>
>My personal impression is that vcl_stale would help retain clarity rather t= >han
>complicate things, in particular because it would help to limit additional<= >br> >processing to the cases when it's actually needed.
>
>b) vcl_refresh()
>----------------
>
>The alternative to vcl_refresh() would be to put additional logic into vcl_= >fetch().
>
>Similar to the stale case, we would want to have access to the original obj= >ect
>in the cache and the beresp from the refresh, so obj would be available onl= >y if
>vcl_refresh was entered with (beresp.status =3D=3D 304).
>
>
>
>We really want to retain clarity and not introduce unneeded additional
>complexity. I believe that introducing more VCL states and procedures would= > help
>to achieve this, in particular because the preconditions for each case were= >
>clear and visibility of a cache object was well defined.
>
>Thanks, Nils
>
>_______________________________________________
>varnish-dev mailing list
>varnish-dev at varnish-cache.= >org
>get=3D"_blank">http://lists.varnish-cache.org/mailman/listinfo/varnish-dev<= >/a>
>

> >--0016362841567a3345049956f881-- > > >--===============4723512172216386742== >Content-Type: text/plain; charset="us-ascii" >MIME-Version: 1.0 >Content-Transfer-Encoding: 7bit >Content-Disposition: inline > >_______________________________________________ >varnish-dev mailing list >varnish-dev at varnish-cache.org >http://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev >--===============4723512172216386742==-- > -- 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 izak at upfrontsystems.co.za Wed Jan 12 21:58:03 2011 From: izak at upfrontsystems.co.za (Izak Burger) Date: Wed, 12 Jan 2011 23:58:03 +0200 Subject: load_module call in vcl Message-ID: <4D2E23EB.6050109@upfrontsystems.co.za> Hi all, I've been studying the embedded C code used by the geoip plugin and noticed how dlopen is used to load this functionality by declaring a load_module procedure. What I cannot seem to figure out is where and how this is called (grep is not my friend tonight), so at present it seems almost like magic (or more likely, a level of indirection I'm missing). Can anyone enlighten me? Also, is there an unload_module or similar partner procedure that one can define for cleanup purposes? regards, Izak From l.barszcz at gadu-gadu.pl Thu Jan 13 07:21:51 2011 From: l.barszcz at gadu-gadu.pl (=?UTF-8?B?xYF1a2FzeiBCYXJzemN6IC8gR2FkdS1HYWR1?=) Date: Thu, 13 Jan 2011 08:21:51 +0100 Subject: load_module call in vcl In-Reply-To: <4D2E23EB.6050109@upfrontsystems.co.za> References: <4D2E23EB.6050109@upfrontsystems.co.za> Message-ID: <4D2EA80F.9070207@gadu-gadu.pl> On 12.01.2011 22:58, Izak Burger wrote: > Hi all, > > I've been studying the embedded C code used by the geoip plugin and > noticed how dlopen is used to load this functionality by declaring a > load_module procedure. What I cannot seem to figure out is where and > how this is called (grep is not my friend tonight), so at present it > seems almost like magic (or more likely, a level of indirection I'm > missing). Can anyone enlighten me? __attribute__((constructor)) void load_module() First line causes this function to be executed at library load (or before main when used in programs). > > Also, is there an unload_module or similar partner procedure that one > can define for cleanup purposes? > There also is destructor which is called on library unload (after main). Some more info on gcc attributes: http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html -- ?ukasz Barszcz web architect Pion Aplikacji Internetowych GG Network S.A http://www.gadu-gadu.pl ul. Kamionkowska 45 03-812 Warszawa tel.: +48 22 4277900 fax.: +48 22 5146498 gg:16210 Sp??ka zarejestrowana w S?dzie Rejonowym dla m. st. Warszawy, XIII Wydzia? Gospodarczy KRS pod numerem 0000264575, NIP 867-19-48-977. Kapita? zak?adowy: 1 758 461,10 z? - wp?acony w ca?o?ci. From izak at upfrontsystems.co.za Thu Jan 13 08:03:18 2011 From: izak at upfrontsystems.co.za (Izak Burger) Date: Thu, 13 Jan 2011 10:03:18 +0200 Subject: load_module call in vcl In-Reply-To: <4D2E23EB.6050109@upfrontsystems.co.za> References: <4D2E23EB.6050109@upfrontsystems.co.za> Message-ID: <4D2EB1C6.5070801@upfrontsystems.co.za> On 12/01/2011 23:58, Izak Burger wrote: > I've been studying the embedded C code used by the geoip plugin and > noticed how dlopen is used to load this functionality by declaring a > load_module procedure. What I cannot seem to figure out is where and how > this is called (grep is not my friend tonight), so at present it seems > almost like magic (or more likely, a level of indirection I'm missing). > Can anyone enlighten me? After 7/8ths of a good night's sleep I realise this is an insanely stupid question, or at least one for which RTFM would have been an justifiable answer. The answer is in the dlopen man page. It would seen dlopen calls anything with the __attribute__((constructor)) attribute to initialise the module, and that there is a destructor as well. This is common for me: I figure things out just as I send an email to the list. Perhaps this helps someone else as well some day. regards, Izak From izak at upfrontsystems.co.za Thu Jan 13 08:14:05 2011 From: izak at upfrontsystems.co.za (Izak Burger) Date: Thu, 13 Jan 2011 10:14:05 +0200 Subject: load_module call in vcl In-Reply-To: <4D2EA80F.9070207@gadu-gadu.pl> References: <4D2E23EB.6050109@upfrontsystems.co.za> <4D2EA80F.9070207@gadu-gadu.pl> Message-ID: <4D2EB44D.6080505@upfrontsystems.co.za> On 13/01/2011 09:21, ?ukasz Barszcz / Gadu-Gadu wrote: > Some more info on gcc attributes: > http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html Thank you very much for this :-) From perbu at varnish-software.com Thu Jan 20 12:51:28 2011 From: perbu at varnish-software.com (Per Buer) Date: Thu, 20 Jan 2011 13:51:28 +0100 Subject: Source repository in flux Message-ID: Migrating from Subversion to Git. Things should be available read only. -- Per Buer,?Varnish Software Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer Varnish makes websites fly! Want to learn more about Varnish? http://www.varnish-software.com/whitepapers From tfheen at varnish-software.com Thu Jan 20 16:23:44 2011 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Thu, 20 Jan 2011 17:23:44 +0100 Subject: Source repository in flux In-Reply-To: (Per Buer's message of "Thu, 20 Jan 2011 13:51:28 +0100") References: Message-ID: <87fwsnv90v.fsf@qurzaw.varnish-software.com> ]] Per Buer | Migrating from Subversion to Git. Things should be available read only. New read-only git URL: git clone git://git.varnish-cache.org/varnish-cache/ If you have a developer account and want to push to the repository, use git clone ssh://git.varnish-cache.org/git/varnish-cache I'll update the documentation on varnish-cache.org as well, it still refers to svn. Please note that the SVN tree is still available, but read-only. It'll stay that way for the foreseeable future. Best regards, -- Tollef Fog Heen Varnish Software t: +47 21 98 92 64 From martin at varnish-software.com Fri Jan 21 13:20:10 2011 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Fri, 21 Jan 2011 14:20:10 +0100 Subject: Review for patch to add derived (calculated) values to the statistics counters reported by libvarnishapi Message-ID: Hi PHK and varnish-dev, Attached is a patch that will add derived values to the stat counters reported by VSC in libvarnishapi. It also adds a derived counter called s_avoidedbytes, which shows a rough estimate of how many bytes Varnish has saved the backend servers from dealing with. Any comments are appreciated. Regards, Martin Blix Grydeland -- Martin Blix Grydeland Varnish Software AS -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: stat-derived-values.patch Type: text/x-patch Size: 3279 bytes Desc: not available URL: From martin at varnish-software.com Fri Jan 21 13:22:13 2011 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Fri, 21 Jan 2011 14:22:13 +0100 Subject: Review for patch to add custom field ordering to varnishstat Message-ID: Hi varnish-dev, Attached is a patch to add custom field ordering to varnishstat. This way you can select (like before) individual fields to be shown using the -f switch, but fields will with patch also be displayed in the order you specify. Any comments are appreciated. Regards, Martin Blix Grydeland -- Martin Blix Grydeland Varnish Software AS -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: varnishstat-reorder.patch Type: text/x-patch Size: 11640 bytes Desc: not available URL: From phk at phk.freebsd.dk Sat Jan 22 07:33:17 2011 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sat, 22 Jan 2011 07:33:17 +0000 Subject: Review for patch to add derived (calculated) values to the statistics counters reported by libvarnishapi In-Reply-To: Your message of "Fri, 21 Jan 2011 14:20:10 +0100." Message-ID: <36618.1295681597@critter.freebsd.dk> In message , Mart in Blix Grydeland writes: >Attached is a patch that will add derived values to the stat counters >reported by VSC in libvarnishapi. It also adds a derived counter called >s_avoidedbytes, which shows a rough estimate of how many bytes Varnish has >saved the backend servers from dealing with. I like the idea. Would it be possible to make the formula for deriving the counter part of the VSC_D() macro ? Something like: VSC_D(s_avoidedbytes, uint64_t, 0, 'a', "Avoided backend bytes (derive d)", ((ptr)->s_hdrbytes + (ptr)->s_bodybytes ...)) -- 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 phk at phk.freebsd.dk Sat Jan 22 07:50:02 2011 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sat, 22 Jan 2011 07:50:02 +0000 Subject: Review for patch to add custom field ordering to varnishstat In-Reply-To: Your message of "Fri, 21 Jan 2011 14:22:13 +0100." Message-ID: <64005.1295682602@critter.freebsd.dk> In message , Mart in Blix Grydeland writes: >Attached is a patch to add custom field ordering to varnishstat. This way >you can select (like before) individual fields to be shown using the -f >switch, but fields will with patch also be displayed in the order you >specify. > >Any comments are appreciated. I think I would prefer if we could do this in libvarnishapi instead of in varnishstat, it seems generally useful at libvarnishapi level to me. How does (should/will) this work with dynamic stats counters ? +struct stat stat; Naming a struct "stat" is often asking for more trouble than it is worth. "struct stat" is what stat(2) and fstat(2) returns and because of various levels of compatibility junk (32/64 bit typically) it can be seriously magicked by compilers. -- 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 martin at varnish-software.com Sun Jan 23 08:01:47 2011 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Sun, 23 Jan 2011 09:01:47 +0100 Subject: Review for patch to add derived (calculated) values to the statistics counters reported by libvarnishapi In-Reply-To: <36618.1295681597@critter.freebsd.dk> References: <36618.1295681597@critter.freebsd.dk> Message-ID: On Sat, Jan 22, 2011 at 08:33, Poul-Henning Kamp wrote: > > I like the idea. > > Would it be possible to make the formula for deriving the counter > part of the VSC_D() macro ? > > Something like: > > VSC_D(s_avoidedbytes, uint64_t, 0, 'a', > "Avoided backend bytes (derive d)", > ((ptr)->s_hdrbytes + (ptr)->s_bodybytes ...)) > > Yes - I can make the feature more completely automated by macro definitions. I will look into this when I get back from my vacation (leaving now and will be gone the next 14 days). -Martin -- Martin Blix Grydeland Varnish Software AS -------------- next part -------------- An HTML attachment was scrubbed... URL: From martin at varnish-software.com Sun Jan 23 08:07:57 2011 From: martin at varnish-software.com (Martin Blix Grydeland) Date: Sun, 23 Jan 2011 09:07:57 +0100 Subject: Review for patch to add custom field ordering to varnishstat In-Reply-To: <64005.1295682602@critter.freebsd.dk> References: <64005.1295682602@critter.freebsd.dk> Message-ID: On Sat, Jan 22, 2011 at 08:50, Poul-Henning Kamp wrote: > I think I would prefer if we could do this in libvarnishapi instead > of in varnishstat, it seems generally useful at libvarnishapi level > to me. > I think it would be possible to move this into the library instead. How does (should/will) this work with dynamic stats counters ? > Not entirely sure what you mean by that? Please elaborate. +struct stat stat; > > Naming a struct "stat" is often asking for more trouble than it is > worth. "struct stat" is what stat(2) and fstat(2) returns and because > of various levels of compatibility junk (32/64 bit typically) it can > be seriously magicked by compilers. > Good point, I will rename that variable. -Martin -- Martin Blix Grydeland Varnish Software AS -------------- next part -------------- An HTML attachment was scrubbed... URL: From phk at phk.freebsd.dk Sun Jan 23 08:50:15 2011 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sun, 23 Jan 2011 08:50:15 +0000 Subject: Review for patch to add custom field ordering to varnishstat In-Reply-To: Your message of "Sun, 23 Jan 2011 09:07:57 +0100." Message-ID: <62031.1295772615@critter.freebsd.dk> In message , Mart in Blix Grydeland writes: >How does (should/will) this work with dynamic stats counters ? >> >Not entirely sure what you mean by that? Please elaborate. As far as I read the code, you could specify the prefix of a name and get all matching counters. That obviously means that more counters matching that prefix could appear later. What happens ? -- 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 jbq at caraldi.com Tue Jan 25 11:40:29 2011 From: jbq at caraldi.com (Jean-Baptiste Quenot) Date: Tue, 25 Jan 2011 12:40:29 +0100 Subject: Is request time available in VCL? Message-ID: Hi, I'm using a varnishncsa patch that logs how long the server took to reply: case SLT_ReqEnd: if (sscanf(ptr, "%*u %*u.%*u %ld.%*u %lf %lf %lf", &l, &idle_t, &proc_t, &xmit_t) != 4) { lp->bogus = 1; } else { t = l; lp->df_D= (proc_t + xmit_t) * 1000000; localtime_r(&t, &lp->df_t); } /* got it all */ return (0); I'd like to add a X-Varnish-Time header in the response to indicate the same number, for service health checks. Is this time information available in VCL? Thanks in advance, -- Jean-Baptiste Quenot From tfheen at varnish-software.com Wed Jan 26 13:30:47 2011 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Wed, 26 Jan 2011 14:30:47 +0100 Subject: Is request time available in VCL? In-Reply-To: (Jean-Baptiste Quenot's message of "Tue, 25 Jan 2011 12:40:29 +0100") References: Message-ID: <87mxmndc6w.fsf@qurzaw.varnish-software.com> ]] Jean-Baptiste Quenot | I'd like to add a X-Varnish-Time header in the response to indicate | the same number, for service health checks. Is this time information | available in VCL? No, it is not. Regards, -- Tollef Fog Heen Varnish Software t: +47 21 98 92 64 From perbu at varnish-software.com Wed Jan 26 17:42:54 2011 From: perbu at varnish-software.com (Per Buer) Date: Wed, 26 Jan 2011 18:42:54 +0100 Subject: [PATCH] try to explain beresp gzip stuff Message-ID: I need a bit of reassurance about how the gzip stuff in VCL works. Does this look ok? --- doc/sphinx/reference/vcl.rst | 19 ++++++++++++++++--- 1 files changed, 16 insertions(+), 3 deletions(-) diff --git a/doc/sphinx/reference/vcl.rst b/doc/sphinx/reference/vcl.rst index 6a93ccf..1e74a8b 100644 --- a/doc/sphinx/reference/vcl.rst +++ b/doc/sphinx/reference/vcl.rst @@ -470,9 +470,6 @@ vcl_fetch error code [reason] Return the specified error code to the client and abandon the request. - esi - ESI-process the document which has just been fetched. - pass Switch to pass mode. Control will eventually pass to vcl_pass. @@ -646,6 +643,22 @@ The following variables are available after the requested object has been retrieved from the backend, before it is entered into the cache. In other words, they are available in vcl_fetch: +beresp.do_esi + ESI-process the object after fetching it. Defaults to 0. Set it to 1 to + activate ESI. + +beresp.do_gzip + Gzip the object before storing it. Defaults to 1, + +beresp.is_gzip + True if the object is compressed. + +beresp.do_gunzip + Unzip the object before storing it. + +beresp.is_gunzip + True if the object is not compressed. + beresp.proto The HTTP protocol version used when the object was retrieved. -- Per Buer,?Varnish Software Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer Varnish makes websites fly! Want to learn more about Varnish? http://www.varnish-software.com/whitepapers From phk at phk.freebsd.dk Wed Jan 26 19:09:50 2011 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Wed, 26 Jan 2011 19:09:50 +0000 Subject: [PATCH] try to explain beresp gzip stuff In-Reply-To: Your message of "Wed, 26 Jan 2011 18:42:54 +0100." Message-ID: <20904.1296068990@critter.freebsd.dk> In message , Per Buer writes: >@@ -646,6 +643,22 @@ The following variables are available after the >requested object has > been retrieved from the backend, before it is entered into the cache. In > other words, they are available in vcl_fetch: > >+beresp.do_esi >+ ESI-process the object after fetching it. Defaults to 0. Set it to 1 to >+ activate ESI. >+ Set to true/false, it's a boolean, to parse the object for ESI directives. >+beresp.do_gzip >+ Gzip the object before storing it. Defaults to 1, Again true/false, default is false. By default we expect the backend to do the gzip'ery, we don't know which object types it makes sense to gzip. >+beresp.is_gzip >+ True if the object is compressed. Havn't implemented that one, would it be useful ? >+beresp.do_gunzip >+ Unzip the object before storing it. correct, again: bool, true/false >+beresp.is_gunzip >+ True if the object is not compressed. not implemented (yet) > beresp.proto > The HTTP protocol version used when the object was retrieved. Actually, the HTTP version the backend replied with. Also: req.can_gzip (BOOL) Does the client accept gzip'ed data ? -- 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 slink at schokola.de Fri Jan 28 16:49:06 2011 From: slink at schokola.de (Nils Goroll) Date: Fri, 28 Jan 2011 17:49:06 +0100 Subject: [PATCH] vmod_digest Message-ID: <4D42F382.5050402@schokola.de> Hi, here's an update to the vmod_digest code I initally posted on October 28th. phk had spotted a race condition in base64_init which I had overlooked (and even commented on sarcastically), so I've added code to pre-generate the base64 lookup tables. All other changes are due to the changes to varnish code since then. Nils -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 0001-ignore-emacs-backups-patch-orig-rej-files-and-libvm.patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 0002--Add-vmod_digest.patch URL: From amedeo.salvati at gmail.com Sun Jan 30 16:56:51 2011 From: amedeo.salvati at gmail.com (Amedeo Salvati) Date: Sun, 30 Jan 2011 17:56:51 +0100 Subject: obj.cacheable discontinuity and lifetime sw policy Message-ID: hi, first i want to tank you and all developers for your work, every time i recommend varnish-cache to our customer, but today i tried to update varnish from source, switching from svn to git repository, and saw that obj.cacheable object was retired with this commit: commit e0db8b06a229058bb759962cb3a3db5e14828e25 Author: Poul-Henning Kamp Date: Fri Jan 28 21:37:38 2011 +0000 Retire the obj.cacheable VCL variable. Whatever our thinking at the time might have been, it clearly was woollen, and all it did was confuse people. Question is: how long statement, object... are supported through minor version release(e.g. 2.1.x) or major version 2, 3, 4? Or they can change at any time on every minor version? I know that on 2.1.5 released few days ago ogj.cacheable it's present, but on 2.1.6? best regards a From perbu at varnish-software.com Sun Jan 30 17:51:01 2011 From: perbu at varnish-software.com (Per Buer) Date: Sun, 30 Jan 2011 18:51:01 +0100 Subject: obj.cacheable discontinuity and lifetime sw policy In-Reply-To: References: Message-ID: Hi, On Sun, Jan 30, 2011 at 5:56 PM, Amedeo Salvati wrote: > > Question is: how long statement, object... are supported through minor > version release(e.g. 2.1.x) or major version 2, 3, 4? Or they can > change at any time on every minor version? > > I know that on 2.1.5 released few days ago ogj.cacheable it's present, > but on 2.1.6? VCL syntax won't change in a minor version. That is, we might add functionality in a minor release but never take something away. -- Per Buer,?Varnish Software Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer Varnish makes websites fly! Want to learn more about Varnish? http://www.varnish-software.com/whitepapers From phk at phk.freebsd.dk Sun Jan 30 18:10:05 2011 From: phk at phk.freebsd.dk (Poul-Henning Kamp) Date: Sun, 30 Jan 2011 18:10:05 +0000 Subject: obj.cacheable discontinuity and lifetime sw policy In-Reply-To: Your message of "Sun, 30 Jan 2011 17:56:51 +0100." Message-ID: <73065.1296411005@critter.freebsd.dk> In message , Amed eo Salvati writes: >Question is: how long statement, object... are supported through minor >version release(e.g. 2.1.x) or major version 2, 3, 4? Or they can >change at any time on every minor version? We try to keep the VCL stable in minor versions, so that a VCL that works with N.m, also works for any N.m+1, N.m+2, ... That allows us to add features, but not to remove them. When we do massive changes, we will change the major version, and the change you just spotted, is part of the 3.x set of changes. -- 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 tfheen at varnish-software.com Mon Jan 31 08:14:55 2011 From: tfheen at varnish-software.com (Tollef Fog Heen) Date: Mon, 31 Jan 2011 09:14:55 +0100 Subject: obj.cacheable discontinuity and lifetime sw policy In-Reply-To: (Amedeo Salvati's message of "Sun, 30 Jan 2011 17:56:51 +0100") References: Message-ID: <87y6618p6o.fsf@qurzaw.varnish-software.com> ]] Amedeo Salvati | Question is: how long statement, object... are supported through minor | version release(e.g. 2.1.x) or major version 2, 3, 4? Or they can | change at any time on every minor version? | | I know that on 2.1.5 released few days ago ogj.cacheable it's present, | but on 2.1.6? We won't change VCL or parameters in backwards-incompatible ways in minor versions. So this change (and similar ones) won't go into 2.1.6, but can (and in this case will) go into 3.0. -- Tollef Fog Heen Varnish Software t: +47 21 98 92 64 From slink at schokola.de Mon Jan 31 12:44:26 2011 From: slink at schokola.de (Nils Goroll) Date: Mon, 31 Jan 2011 13:44:26 +0100 Subject: tiny [PATCH] for tests/m00004.vtc: use printf instead of echo -n Message-ID: <4D46AEAA.60401@schokola.de> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 0001-Use-printf-instead-of-echo-because-echo-n-does-no.patch URL: