Help debugging cacheability / ttl information?

2008-01-31 Thread Denis Brækhus
Hi,

We have a setup with varnish in front of a lighttpd+fastcgi combo. For some 
reason or other the application doesn't send any cache control headers. Instead 
of doing the sensible thing (prodding the developers to fix it in the backend) 
I have taken it upon myself to fix it via VCL. 

However my feeble attempts at being smart have so far failed elegantly, and I 
am left scratching my head a bit.

What I really am looking for is some help with how to best debug the setup with 
regards to TTLs and cacheability. I'd like to be able to inspect a specific 
cached objects TTL to see if my set obj.ttl overrides actually work or not. 
What is the best way to do that? 

On the client I use firebug, so all headers and responess are readily available 
on that end. The reason I don't think everything is as it should is that the 
Age header is very low most of the time.

For the record we are still at varnish 1.0.4 and here is the current VCL (I've 
taken out the stuff that was obviously not working anyway) :


backend default {
set backend.host = 127.0.0.1;
set backend.port = 80;
}

sub vcl_recv {
if (req.request == GET  req.http.cookie) {
lookup;
}
if (req.request == GET  req.url ~ \.(gif|jpg|swf|css|js)$) {
lookup;
}
}

sub vcl_fetch {
if (obj.ttl  120s) {
set obj.ttl = 120s;
}
if (resp.http.Set-Cookie) {
insert;
}
}


Any help will be highly appreciated!

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


Re: Varnish and awstats

2007-08-22 Thread Denis Brækhus
From: jdouglas [EMAIL PROTECTED] 
Is there a trick to getting awstats to work with varnish? 

I tried doing varnishncsa -a -w filename and then pointed awstats to this file 
but it gives me an error that the log format must be incorrect 

a bad format or LogFormat parameter setup does not match this format. Your 
AWStats 
LogFormat parameter is: 4 This means each line in your web server log file 
need to 
have common log format like this 

Try setting the Combined logformat instead, which is what varnishncsa 
produces.. 
From the varnishncsa man page : Display Varnish logs in Apache / NCSA 
combined log format 

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS 
http://www.startsiden.no 

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


Re: Varnish - configuration

2007-07-23 Thread Denis Brækhus
From: Kamil Radziszewski [EMAIL PROTECTED] 
How to configure varnish to cache files from website that is on anoter IP 
adress as the varnish ? 

man vcl gives you info on the backend directive to use in your vcl config:

backend default {
   set backend.host = www.example.com;
   set backend.port = 80;
}

You can also use more than one backend, but instead of quoting the entire 
manpage, [EMAIL PROTECTED] better if you check it yourself really.

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS 
http://www.startsiden.no 

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


Re: Failure cenarios?

2007-07-03 Thread Denis Brækhus
- Gaute Amundsen [EMAIL PROTECTED] wrote:
 I have come to understand that in some builds under some conditions
 varnish 
 may hang or a crash. (we run 1.0.4-3el4.i386.rpm)

Hi Gaute,

I'll just say that in my experience Varnish has proven itself to be extremely 
stable. We actually run 1.0.3 across the board (yes I know there are known 
bugs, however we do not experience them at all) and Varnish currently serves up 
all requests at www.startsiden.no and www.abcnyheter.no. If anything breaks, it 
has not so far been varnish. 

However our scenario is pretty different from yours, we have very few vhosts 
but each has a very high amount of traffic. There is little or no advanced VCL 
configuration at all on our sites. We're pretty close to the default. The two 
sites have a different setup with regards to placement of Varnish. One site 
runs with dedicated varnish servers, the other has varnish and apache2 on the 
same box.

 Now the question is, how do I best detect if varnsih should have a
 problem?
 Would it be reasonably reliable to just chek if the pid 
 from /var/run/varnish.pid is running, do I need to fetch a page, or is
 there 
 some better way?

Well, we always monitor as high up as possible to make sure everything works on 
all levels. Lower level monitoring is useful too, but for pinpointing with more 
accuracy where the problem is. 

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS
http://www.startsiden.no

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


Re: Varnish Dirty Caching

2007-07-03 Thread Denis Brækhus
- Dag-Erling Smørgrav [EMAIL PROTECTED] wrote:
 Christoph [EMAIL PROTECTED] writes:
  So what is dirty caching and why use it? Think of a very unreliable
  backend. If varnish can't reach it's backend, it will simply return
  the last content it has (even if the content is stale). That way i
  can cover hickups.
 It's on our list for 2.0, and will probably hit trunk in late July.

Way cool, really looking forward to that feature! As I stated in a different 
thread it's more often other parts of the system that break than varnish  so 
having such a failsafe enables us to do a lot more fault tolerant setups.

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS
http://www.startsiden.no

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


Re: Problem with varnish and caching

2007-07-03 Thread Denis Brækhus
- Anup Shukla [EMAIL PROTECTED] wrote:
 Manuel Amador (Rudd-O) wrote:
  site is cached according to Varnish default policies.  You have not
  provided a single counterexample or a single snippet of VCL that
  could solve the problems I have, or a single snippet of VCL that you guys
  are actually using on production servers.
 man vcl does provide an example about how to cache even if Cookies
 are present. 
 Did i miss something?

Yeah, I think you missed the fact that Manuel isn't really interested in 
anything else than spewing out insults and bulls*** on the list. Nothing to see 
/ hear here people move on, just an angry troll.

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS
http://www.startsiden.no

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


Re: Varnish and Perlbal

2007-07-02 Thread Denis Brækhus
- André Cruz [EMAIL PROTECTED] wrote:
 Ok, I'll try it both ways to test.
 
 And regarding my other question... Should Perlbal handle the request 
 
 first, and pass it to some varnish process or should varnish process 
 
 the request first and send only the misses to PerlBal+Apache?
 
 Perlbal is probably better at load-balancing since it is it's core  
 function, no?
 
 Thanks for your help,
 André

André,

If we can assume one of the reasons you want to use Perlbal is to achieve some 
sort of failover capability, I would say place Perlbal in front of Varnish. If 
you have another provision to handle that and you only want to improve 
performance I would say it depends on your application really. I completely 
agree with DES though that implementing Varnish locally on the same box as 
apache is indeed the path of least configuration and fewest changes :P

From what I have read on Perlbal it should be suited for placement in front of 
a cache such as varnish. 

Could I ask what your experience with Perlbal is? Is it a nice loadbalancer? 
How does your setup with it look like?  What kind of traffice do you see?


I gather the Varnish project is looking to implement some sort of basic load 
balancing capabilities into Varnish at some point in time.

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS
http://www.startsiden.no

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


Re: varnish and Nginx

2007-07-02 Thread Denis Brækhus
- Dingo [EMAIL PROTECTED] wrote:
 How would one compare say varnich with nginx 
 http://wiki.codemongers.com/Nginx
 where i see Nginx is not only a web server but a balancer for 
 http/pop/imap/smtp

Interesting question. I have myself been looking at Nginx, mainly for its 
capabilities as a web loadbalancer / front-end.

From what I've read Nginx is not a cahce per se. It does serve static content 
(like any other webserver), can be coupled with fastcgi backends to serve 
dynamic content, and can also be used as an accelerating reverse proxy, in 
that it handles requests on behalf of slower backend servers (including 
loadbalancing). It does not (AFAIK) function as a web cache. 

Varnish is a web cache, and to serve any content at all you need some sort of 
webserver behind it. 

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS
http://www.startsiden.no

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


Re: varnish and Nginx

2007-07-02 Thread Denis Brækhus
- Dingo [EMAIL PROTECTED] wrote:
 So its feasible to run Nginx as the server/load balancer and varnish
 as the front end cache giving potentially a decent high speed/high
 capacity design.

Well, I have no experience with Nginx whatsoever, but yes, both could be 
components in a high speed/high capacity design. 

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS
http://www.startsiden.no

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


Re: Passing through client IP address to server

2007-06-08 Thread Denis Brækhus
- ADOFMS Admin, SteveOC [EMAIL PROTECTED] wrote:
 There is also a HTTP_X_VARNISH variable set as well, which is just a
 number.  Any idea what this one does ?

This number is a request number you can use for debugging. 
varnishlog outputs these identifiers and you can cross check with the number 
from the header.

Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS
http://www.startsiden.no

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


Re: Current Varnish status?

2007-02-13 Thread Denis Brækhus
- Kenneth Rørvik [EMAIL PROTECTED] wrote:
 Denis Brækhus wrote:
  So, my question is, how stable do you consider the current release
 to be? 
 (http://www.hio.no) for three weeks + now. In that time, there's been
 one major incident, in which varnish suddenly started dropping all 
 incoming connections, possibly resetting, with clients ending up
 simply with blank pages.

Thanks for the info. I added a content script check to my alteons, checking for 
the length of a particular object through http. This should eliminate any major 
mishaps I guess.

So my setup ended up being :

VarnishServer1VarnishServer2
  | |
AppServer1AppServer2

If VarnishServer1 or 2 fails the alteon falls back to using the relevant 
appserver directly instead.. 

Looking forward to see how this performs under load. I have high expectations 
for Varnish actually :)


Regards
-- 
Denis Braekhus - Teknisk Ansvarlig ABC Startsiden AS
http://www.startsiden.no

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