Problems getting Varnish to cache certain things

Anders Nordby anders at fupp.net
Fri Jun 12 16:33:50 CEST 2009


Hi,

I had a situation where some cache servers would cache a URL, and others
would not. The strange thing is, if I restarted Varnish on the servers
that did not cache it, then it would cache the URL. How is that? When
Varnish delivers a miss, it should fetch (and if possible) cache the URL
on the next attempt? Why does a restart have any significance? I tried
some purging, without any success. After all, how can you purge
something that is not cached..

I wrote a simple script to check:

Checking server cache2.xx.no for URI banner.xx.no/rest/foo_rest/foo/prepackage/result?&BAR=200907&sort=1
=>
HTTP/1.1 200 OK
X-Varnish-IP: 192.168.39.142
X-Varnish-Server: cache2
X-Varnish: 942085260 941884380
X-Cache: HIT

Sjekker server cache3.xx.no for URI banner.xx.no/rest/foo_rest/foo/prepackage/result?&BAR=200907&sort=1
=>
HTTP/1.1 200 OK
X-Varnish-IP: 192.168.39.143
X-Varnish-Server: cache3
X-Varnish: 3642432563
X-Cache: MISS

Miss..

-- 
Anders.



More information about the varnish-misc mailing list