Re: [squid-users] Question about url redirection

From: Snowy <xuefeng18@dont-contact.us>
Date: Thu, 4 Jul 2002 14:28:27 +0800

> hi *
> I have a question about the url redirector if I want to serve multiple
> webservers:
> in the squid documentation I found:
> "Note that the mapping needs to be a 1-1 mapping between requested and
> backend (from redirector) domain names or caching will fail, as caching
> is performed using the URL returned from the redirector"
>
> So, if I have the following redirector which mapps 2 official web urls
> to internal servers:
> s,^http://www.shopping.com,http://server1.internal.other.com,
> s,^http://www.buying.com,http://server2.internal.other.com,
>
> Will this be a problem for caching because I have different domain names
> for official and internal servers???
> What I have seen so far is, that only server1 and server2 will occur
> inside the cache, but not shopping and buying, because
> the cache uses the urls it gets from the redirector.
> I really dont understand what this "1-1 mapping" means.
> Can anybody explain this to me?

Hi,

Well, what you have seen is already illustrating "1-1 mapping" by itself.
;-) In other words, if you want to apply the following rules to redirector:

s,^http://www.buying.com,http://server1.internal.other.com,
s,^http://www.buying.com,http://server2.internal.other.com,

It will then confuse Squid cache because it will not know which in-store
object to be returned to the client given the unique URL:
http://www.buying.com. Remember that as far as caching is concerned, each
URL is strictly and uniquely mapped to one cache object through a hashing
algorithm.

Hope this helps.

Snowy
Received on Thu Jul 04 2002 - 00:28:52 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:09:01 MST