varnishd runtime parameters

2009-03-23 Thread Tung Nguyen
Hi guys,
So, Im reading over an archive email thread about twitters configuration.

http://projects.linpro.no/pipermail/varnish-dev/2009-February/000968.html

It looks like they had to adjust a lot of parameters... and Im not finding
all the parameters definitions in the varnishd man pages.  Im wondering if
for most cases running varnish with the defaults is fine?

Any caveats here which run time parameters should I focus on.

Like with the vcl, the main two hooks to pay attention to are vcl_recv and
vcl_fetch

Any advice is appreciated,
Thanks,
Tung
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Purge and cache content mist.

2009-03-23 Thread Loesche, Lukas, scoyo

 
> on my setup i only have one host. i'm sure you can restrict that to one single
> host, but i don't know by heart.

I don't think you can. At least I couldn't find any method to do host based
purging without using the PURGE HTTP Method.

> if url.purge can't do that you can setup url purging
> see the link below the faq question
> http://varnish.projects.linpro.no/wiki/FAQ#HowcanIforcearefreshonaobjectcached
> byvarnish
> http://varnish.projects.linpro.no/wiki/VCLExamplePurging

True, but if he's doing this he can't do Wildcard purging!

If there's any way to do wildcard purging on a specific hostname I'd be
interested in that too.

Something like for instance

PURGE /foo/bar/.* HTTP/1.1
Host: some.host.tld

But afaik this is not possible yet.


Thanks,
-- Lukas

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Purge and cache content mist.

2009-03-23 Thread Harald Friessnegger
hi 

Am Montag, 23. März 2009 15:10:01 schrieb Sébastien FOUTREL:
> Thank you.
>
> About the url.purge, should I understand that url.purge doesn't manage
> hosts so url.purge /that-part/.* will purge 
> http://onedomain.com/that-part/* and http://otherdomain.com/that-part/* ?
> Can I use onedomaine\.com/that-part/.* to purge only '/that-part/' in that
> host :) ?

on my setup i only have one host. i'm sure you can restrict that to one single 
host, but i don't know by heart.


if url.purge can't do that you can setup url purging
see the link below the faq question
http://varnish.projects.linpro.no/wiki/FAQ#HowcanIforcearefreshonaobjectcachedbyvarnish
http://varnish.projects.linpro.no/wiki/VCLExamplePurging

regards, harald

>
>
> -Message d'origine-
> De : Harald Friessnegger [mailto:har...@webmeisterei.com]
> Envoyé : lundi 23 mars 2009 14:14
> À : varnish-misc@projects.linpro.no
> Cc : Sébastien FOUTREL
> Objet : Re: Purge and cache content mist.
>
> hi sebastien
>
> Am Montag, 23. März 2009 12:32:22 schrieb Sébastien FOUTREL:
> > Hello,
> >
> > I read a lot of things in the list and varnish sites but some things stay
> > fuzzy to me.
> >
> > Is there a way to find if something is in the cache, have a map of cached
> > content or some script that give one ?
>
> i don't know of a list output. what i do is to use varnishlog or turn on
> debug headers:
>
>
> open varnishlog, request a resource and see at the X-Varnish-Action Header
>
>
> requesting a resource the first time that gets cached will give you
>
> TxHeader c X-Varnish-Action: FETCH (insert)
>
> requesting it again will log
>
> TxHeader c X-Varnish-Action: HIT (deliver - from cache)
>
>
>
> personally i'm using some combination with grep that gives me the headers
> i'm interested in:
>
>
> For debugging all requests to a certain url (eg /test/test/image_mini) and
> see important headers::
>
> varnishlog -c -o  RxURL '^/test/test/image_mini$' | grep -E
> "RxRequest|RxURL| Host:|TxStatus|TxResponse|X-Varnish-Action"
>
> > Is it possible to do recursive purge in a way or another ?
> >
> > I'd like to purge "www.example.org/that-part/" is to possible to simply
> > purge all objects under that url ?
>
> run varnish with the -T option (eg "-T localhost:6182")
>
> connet via telnet:
>
> telnet localhost 6182
>
> and call something like
>
> url.purge /that-part/.*
>
>
> to see whether to use www.example.org/that-part or just /that-part or any
> other fancy url (you might have a webserver rewrite urls for doing
> virtualhosting) you can use varnishlog again:
>
> varnishlog -c -i RxURL
>
>
>
> hope that helps
>   fRiSi
>
> > Thank you.
> >
> > --
> > Sébastien FOUTREL
> >
> >
> >
> > ___
> > varnish-misc mailing list
> > varnish-misc@projects.linpro.no
> > http://projects.linpro.no/mailman/listinfo/varnish-misc



-- 
Webmeisterei GmbH - Büro für Netzfragen
Tel: +43 5572 908877,  Fax: +43 5572 908877-66
Steinebach 18, A-6850 Dornbirn

http://www.webmeisterei.com
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


RE: Purge and cache content mist.

2009-03-23 Thread Sébastien FOUTREL
Thank you.

About the url.purge, should I understand that url.purge doesn't manage hosts
 so url.purge /that-part/.* will purge  http://onedomain.com/that-part/* and 
http://otherdomain.com/that-part/* ?
Can I use onedomaine\.com/that-part/.* to purge only '/that-part/' in that host 
:) ?


-Message d'origine-
De : Harald Friessnegger [mailto:har...@webmeisterei.com] 
Envoyé : lundi 23 mars 2009 14:14
À : varnish-misc@projects.linpro.no
Cc : Sébastien FOUTREL
Objet : Re: Purge and cache content mist.

hi sebastien


Am Montag, 23. März 2009 12:32:22 schrieb Sébastien FOUTREL:
> Hello,
>
> I read a lot of things in the list and varnish sites but some things stay
> fuzzy to me.
>
> Is there a way to find if something is in the cache, have a map of cached
> content or some script that give one ?

i don't know of a list output. what i do is to use varnishlog or turn on debug 
headers:


open varnishlog, request a resource and see at the X-Varnish-Action Header


requesting a resource the first time that gets cached will give you

TxHeader c X-Varnish-Action: FETCH (insert)

requesting it again will log

TxHeader c X-Varnish-Action: HIT (deliver - from cache)



personally i'm using some combination with grep that gives me the headers i'm 
interested in:


For debugging all requests to a certain url (eg /test/test/image_mini) and see 
important headers::

varnishlog -c -o  RxURL '^/test/test/image_mini$' | grep -E "RxRequest|RxURL|
Host:|TxStatus|TxResponse|X-Varnish-Action"



>
> Is it possible to do recursive purge in a way or another ?
>
> I'd like to purge "www.example.org/that-part/" is to possible to simply
> purge all objects under that url ?


run varnish with the -T option (eg "-T localhost:6182")

connet via telnet:

telnet localhost 6182

and call something like

url.purge /that-part/.*


to see whether to use www.example.org/that-part or just /that-part or any 
other fancy url (you might have a webserver rewrite urls for doing 
virtualhosting) you can use varnishlog again:

varnishlog -c -i RxURL



hope that helps
  fRiSi


>
> Thank you.
>
> --
> Sébastien FOUTREL
>
>
>
> ___
> varnish-misc mailing list
> varnish-misc@projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc



-- 
Webmeisterei GmbH - Büro für Netzfragen
Tel: +43 5572 908877,  Fax: +43 5572 908877-66
Steinebach 18, A-6850 Dornbirn

http://www.webmeisterei.com


___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


RE: Purge and cache content mist.

2009-03-23 Thread Loesche, Lukas, scoyo

> From: Sébastien FOUTREL 
...
> Is there a way to find if something is in the cache, have a map of cached
> content or some script that give one ?

http://varnish.projects.linpro.no/wiki/FAQ#CanIseewhatVarnishholdsinthecache

> Is it possible to do recursive purge in a way or another ?

http://varnish.projects.linpro.no/wiki/FAQ#HowcanIforcearefreshonaobjectcach
edbyvarnish


Cheers,
-- Lukas

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Purge and cache content mist.

2009-03-23 Thread Harald Friessnegger
hi sebastien


Am Montag, 23. März 2009 12:32:22 schrieb Sébastien FOUTREL:
> Hello,
>
> I read a lot of things in the list and varnish sites but some things stay
> fuzzy to me.
>
> Is there a way to find if something is in the cache, have a map of cached
> content or some script that give one ?

i don't know of a list output. what i do is to use varnishlog or turn on debug 
headers:


open varnishlog, request a resource and see at the X-Varnish-Action Header


requesting a resource the first time that gets cached will give you

TxHeader c X-Varnish-Action: FETCH (insert)

requesting it again will log

TxHeader c X-Varnish-Action: HIT (deliver - from cache)



personally i'm using some combination with grep that gives me the headers i'm 
interested in:


For debugging all requests to a certain url (eg /test/test/image_mini) and see 
important headers::

varnishlog -c -o  RxURL '^/test/test/image_mini$' | grep -E "RxRequest|RxURL|
Host:|TxStatus|TxResponse|X-Varnish-Action"



>
> Is it possible to do recursive purge in a way or another ?
>
> I'd like to purge "www.example.org/that-part/" is to possible to simply
> purge all objects under that url ?


run varnish with the -T option (eg "-T localhost:6182")

connet via telnet:

telnet localhost 6182

and call something like

url.purge /that-part/.*


to see whether to use www.example.org/that-part or just /that-part or any 
other fancy url (you might have a webserver rewrite urls for doing 
virtualhosting) you can use varnishlog again:

varnishlog -c -i RxURL



hope that helps
  fRiSi


>
> Thank you.
>
> --
> Sébastien FOUTREL
>
>
>
> ___
> varnish-misc mailing list
> varnish-misc@projects.linpro.no
> http://projects.linpro.no/mailman/listinfo/varnish-misc



-- 
Webmeisterei GmbH - Büro für Netzfragen
Tel: +43 5572 908877,  Fax: +43 5572 908877-66
Steinebach 18, A-6850 Dornbirn

http://www.webmeisterei.com
___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Purge and cache content mist.

2009-03-23 Thread Sébastien FOUTREL
Hello,

I read a lot of things in the list and varnish sites but some things stay fuzzy 
to me.

Is there a way to find if something is in the cache, have a map of cached 
content or some script that give one ?

Is it possible to do recursive purge in a way or another ?

I'd like to purge "www.example.org/that-part/" is to possible to simply purge 
all objects under that url ?

Thank you.

--
Sébastien FOUTREL



___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc


Re: Default behaviour with regards to Cache-Control

2009-03-23 Thread Ole Laursen
Ole Laursen  writes:

> > Well, if people in general think our defaults should be that way, we
> > can change them, our defaults are whatever the consensus can agree on.
> 
> Cool! That'd make one particular webserver owner's job a bit easier, and I
> suspect many others too. :)

I've opened an issue now:

  http://varnish.projects.linpro.no/ticket/477

It probably sounds obvious now, but it was really difficult to track down why my
web app didn't work as expected since the problem only manifested itself
occasionally (took more than 6 months before I finally figured it out). I really
didn't expect it.


Ole

___
varnish-misc mailing list
varnish-misc@projects.linpro.no
http://projects.linpro.no/mailman/listinfo/varnish-misc