URL rewriting / ignoring query parameters?
tom at razz.com
Mon Sep 10 20:21:27 CEST 2007
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:
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!
More information about the varnish-misc