Newbie : Static content caching

Anup Shukla anup at iamcool.net
Mon Jun 11 10:07:28 CEST 2007


Hello all,

I have been using Varnish with its "default configuration" for quite 
sometime now.
Absolutely nothing has changed except for the backed servers port number 
(set to 8000).

Needless to say that it has been performing brilliantly and has reduced 
the load on our webservers considerably.

Just noticed something strange though.
Before i explain further, please let me clarify that i am not an expert 
in caching by any standard, so this happens to be more of a newbie question.

I am running varnish and the backend apache on the same server.
The backend listens on the loopback address while varnish listens on the 
interface facing the load balancer.

If i request, say for example, a static jpeg, i assume that the first 
request will be served by the webserver via varnish, and all later 
requests would be served by varnish, without asking for it from the 
webserver, that is till the object exceeds its lifetime in the cache.

What i observe is this:
the request for the jpeg is sent to the webserver everytime, the 
webserver send the entire content to varnish, and varnish sends a 304 
Not Modified to the client browser.

Is this the expected behaviour?
Do i need to do some VCL'ing to get it work the way i expect?

Any help or pointers will be very much appreciated.

Thank you.




More information about the varnish-misc mailing list