[squid-users] Load Balancing Content Types

2003-09-20 Thread Darryn Lowe
Hi,


I'm new to many of the options within Squid, so I would appreciate any
help with the following scenario.


I have network wherein the squid proxy connects to the Internet via two
parent proxies.

 /-< ISDN << Parent Proxy #1
 |
   Squid <---+
   Proxy |
 \-< ADSL << Parent Proxy #2


Parent Proxy #1 (over the IDSN line) is monitored by an
organisation-wide content filtering process.  Although the simple
solution is to simply use this link alone, the cost required to upgrade
it to the required capacity is prohibitive.

Parent Proxy #2 (over the ADSL line) is a high capacity multi-megabit
connection that, while lacking any filtering capability, is cheap and
fast.  


Hence, what I would like to do is have Parent Proxy #2 used for any
non-textual content (e.g. image files, audio files, etc) while Parent
Proxy #1 is used for generic HTML.


Therefore, is it possible to have Squid change parent proxies based on
the content type of the requested URL?  How do I do this?


Finally, are there any other options to balance the load over these two
connections?  The ideal solution would appear to have all requests go
through to Parent Proxy #1 and then, when the squid proxy received a
HTTP response that suggested the desired URL is accessible, the request
would be dropped and then re-made via Parent Proxy #2.


Any and all comments appreciated.

Thanks,

Darryn.



Re: [squid-users] Load Balancing Content Types

2003-09-22 Thread Henrik Nordstrom
On Sun, 21 Sep 2003, Darryn Lowe wrote:

> Therefore, is it possible to have Squid change parent proxies based on
> the content type of the requested URL?  How do I do this?

This you can't, as the content type is not known until the reply is seen.

What you can do is to select parent proxy based on an estimate of what the 
content type will be based on the extension of the URL (i.e. 
http://www.example.com/some/song.mp3 is quite likely a mp3 file). For this 
purpose see the urlpath_regex acl and the cache_peer_access directive.

Regards
Henrik