Varnish Handling Redirects

Anderson Brown andersonbrown8 at gmail.com
Wed Jul 7 19:07:00 CEST 2010


Hi All -

I tried to search for "redirects" on the mailing list and the wiki,
but couldn't find anything that would fit our needs.  We have a CDN
that, when queried, will return the following:

http://router.domain.com/somefile -> will return a 302 to either:
+ http://sanjose.domain.com/somefile (if you are in the west coast); or
+ http://newyork.domain.com/somefile (if you are in the east coast)

We are going to take baby steps and put varnish on the edge (instead
of replacing the entire thing).  Questions are:

1) We are planning to configure varnish to point to router.domain.com
as parent.  Is Varnish able to follow thru the subsequent redirects to
[sanjose or newyork]; and return the content to the client?

2) Assuming the answer to number 1 is yes, and Varnish gets
/somefile1.txt from sanjose, then when the caching expires and varnish
does a "if-not-modified" query to the parent, but gets redirected to
newyork.  Would it treat the same object as the same (assuming server
says file is the same)?

Thanks
Anderson




More information about the varnish-dev mailing list