[squid-users] prefer_direct configuration

2008-07-08 Thread Dean Weimer
I am trying to setup a new proxy server at a remote location which has both a 
T1 link to our main office and a DSL connection to the internet.  The DSL 
connection has a much larger download than the T1 so it's preferable to use it 
for web browsing, but I would like to be able to have the proxy server 
automatically route traffic through the T1 and use our proxy servers here as 
parents in the event that the DSL would fail and the T1 line is still up.

I have added the proxy servers at our main office using the cache peer entries, 
and defined the icp_port.

cache_peer 10.50.20.5 parent 8080 8181
cache_peer 10.50.20.4 parent 8080 8181
icp_port 8181

Then added the prefer_direct on entry.
prefer_direct on

I tested by manually entering a false route on the remote proxy server for one 
website, it does load, but only after waiting for a timeout  for each and every 
request (watching packet traces appears to show 4 attempts for each before 
falling back to the parent cache).  Since this covers not only the html files, 
but requests for each image, and any subsequent links form the same web site 
all continue to follow this behavior.  The end result is for a small page with 
a few images it takes anywhere from 2 to 4 minutes to complete.
Is there a way to adjust the timeouts, and perhaps have it cache the path for a 
period of time after having one failure before trying again?
Or is my method of testing flawed, and causing this behavior?
 
Thanks,
 Dean Weimer
 Network Administrator
 Orscheln Management Co



Re: [squid-users] prefer_direct configuration

2008-07-08 Thread Henrik Nordstrom
On tis, 2008-07-08 at 12:59 -0500, Dean Weimer wrote:
 I am trying to setup a new proxy server at a remote location which has
 both a T1 link to our main office and a DSL connection to the
 internet.  The DSL connection has a much larger download than the T1
 so it's preferable to use it for web browsing, but I would like to be
 able to have the proxy server automatically route traffic through the
 T1 and use our proxy servers here as parents in the event that the DSL
 would fail and the T1 line is still up.

For this it's best if you use some link monitoring and reconfigure Squid
accordingly.

Trying to do it by automatic failover will not perform very well as
there is no link monitoring in Squid and the procedure repeats per each
request..

But by setting connect_timeout reasonably low you can make it almost
work without link monitoring..

Regards
Henrik


signature.asc
Description: This is a digitally signed message part