Re: [squid-users] Question about url redirection

From: Stefan M. Ritter <ritter.s@dont-contact.us>
Date: Thu, 04 Jul 2002 08:48:24 +0200

Snowy wrote:

>>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
>
>
>
hi, thanks so far.
I am note sure if I really understand this: in my example: will there be
caching or not???
I can see that server1 and server2 objects are in the cache (using
purge), so there should
be caching, or not!?

So, if I want redirection to internal servers AND caching, do I have to
do the following:
    s,http://www.buying.com,http://www.buying,com,
    s,http://www.shopping.com,http://www.shopping.com,
together with entries in my local hosts file:
    www.buying.com 192.168.0.1
    www.shopping.com 192.168.0.2
where these are the internal ip addresses of the servers???

but if this is so, I never would be able to cache a website which is
on different servers (e.g.: the static parts on server1 and the
dynmamic parts on server2)

stefan
Received on Thu Jul 04 2002 - 00:48:52 MDT

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