Re: [squid-users] Redirect to specific parent depends on URL

From: Mr Crack <mrcrack007@dont-contact.us>
Date: Tue, 18 Dec 2007 16:44:33 +0630

On 12/17/07, Amos Jeffries <squid3@treenet.co.nz> wrote:
> > Dear All,
> > I have two ISPs and I'd to redirect to parent based on URL. See my
> > situation below.
> >
> > / ISPA (eth0) e.g. 1.1.1.1 (same
> > proxies of ISPA) (ADSL 512 Kbps)
> > LAN eth3--->LinuxBox--|-- ISPA (eth1) e.g. 1.2.1.1 (same proxies of
> > ISPA) (ADSL 256 Kbps)
> > \ ISPB (eth2) e.g. 1.3.1.1
> > (ADSL 512 Kbps but not stable)
> > My cache configuration is as show below
> > cache_peer ISPA_Proxy1 parent 8080 3130 no-query
> > cache_peer ISPA_Proxy2 parent 8080 3130 no-query
> > cache_peer ISPA_Proxy3 parent 8080 3130 no-query
> > cache_peer ISPA_Proxy3 parent 8080 3130 no-query
> >
> > cache_peer ISPB_Proxy1 parent 8080 3130 no-query
> > cache_peer ISPB_Proxy1 parent 8080 3130 no-query
> >
> > Here is what I want to do.
> > 1. I want to balance load evenly to both ADSL connection to ISPA.
> > They have same proxy parents.
> > If it is not possible to balance evenly, I'd to set 512 Kbps
> > connection as default and when it fill load, then redirect to 256 Kbps
> > ADSL
>
> Depends on how your squid was built. You fail to say which version and
> release you are talking about.
> Look up the cache_peer options, several of them are for load balancing.
> You want one of the weighted algorithms, probably carp.
>
> http:/www.squid-cache.org/Versions/v2/2.6/cache_peer.html
>
> > 2. Some sites are banned by ISPA but ISPB allow. And also some sites
> > banned by ISPB is allow by ISPA.
> > This is the reason why I use two ISP
> > So, I want to redirect banned site of ISPA to ISPB. For e.g.
> > Metacafe is banned by ISPB and I want to redirecto ISPA
>
> cache_peer_access
>
> http:/www.squid-cache.org/Versions/v2/2.6/cache_peer_access.html
>
> I'm assuming you are one of the multitude on squid2.6 since you don't say.
>
> >
> > Any suggestion is highly appricated.....?
> >
> > Mr. Crack007
> >
>
> Amos
>
>
>
I am using RedHat Enterprise Linux Version 3 and below is my squid
version and compiled info
============>
root# squid -v
Squid Cache: Version 2.5.STABLE3
configure options: --host=i386-redhat-linux --build=i386-redhat-linux
--target=i386-redhat-linux-gnu --program-prefix= --prefix=/usr
--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include
--libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/var
--sharedstatedir=/usr/com --mandir=/usr/share/man
--infodir=/usr/share/info --exec_prefix=/usr --bindir=/usr/sbin
--libexecdir=/usr/lib/squid --localstatedir=/var
--sysconfdir=/etc/squid --enable-poll --enable-snmp
--enable-removal-policies=heap,lru
--enable-storeio=aufs,coss,diskd,null,ufs --enable-ssl
--with-openssl=/usr/kerberos --enable-delay-pools
--enable-linux-netfilter --with-pthreads
--enable-basic-auth-helpers=LDAP,NCSA,PAM,SMB,SASL,MSNT,winbind
--enable-ntlm-auth-helpers=SMB,winbind,fakeauth
--enable-external-acl-helpers=ip_user,ldap_group,unix_group,wbinfo_group,winbind_group
--enable-auth=basic,ntlm --enable-useragent-log --enable-referer-log
==================>
I will also take a look at CARP

Mr. Crack007
Received on Tue Dec 18 2007 - 03:14:35 MST

This archive was generated by hypermail pre-2.1.9 : Tue Jan 01 2008 - 12:00:02 MST