URL rewriting / ignoring query parameters?

Tom Pepper tom at razz.com
Mon Sep 10 20:21:27 CEST 2007


Hello all:

I'm using varnish to act as a front-end cache for yet another social  
networking widget site.  Our SWFs are presented with a tracking ID in  
the URI request which allows us to know which instance of the same  
widget in the wild is being viewed the most.  The requests look like:

GET http://content.razz.com/mixer/playerdefaulta.swf? 
u=2743&s=28&o=181618
GET http://content.razz.com/mixer/playerdefaulta.swf? 
u=2743&s=25&o=186119
GET http://content.razz.com/mixer/playerdefaulta.swf?u=178170&s=1

All 3 of these requests serve the same SWF (playerdefaulta.swf).  At  
the moment, we use squid for our reverse-proxy solution.  I'm using  
squirm to provide regexp-rewriting logic within squid since otherwise  
squid would cache 3 separate objects to serve each of these requests,  
when in reality the backend makes no differentiation between which  
object is served (playerdefaulta.swf)

I've tried poking through the varnish documentation I could find, and  
after reviewing the mailing list and the man page on vcl I'm not  
certain if it's possible to perform the following tasks in varnish w/ 
r/t these requests:

1) log the request exactly as it came from the client.  We use these  
logs to track which distinct widget in the wild was viewed.
2) instruct varnish to ignore the query parameters and only cache one  
instance of the swf for all of these requests.

I hope I've explained things adequately.  Thanks in advance for your  
consideration, and I'm really glad someone's tackling reverse-proxy  
with a project specifically designed to address it!

Best,
-t




More information about the varnish-misc mailing list