Re: multi ethernet cards for a squid cache

From: Chris Tilbury <Chris.Tilbury@dont-contact.us>
Date: Wed, 7 Jul 1999 11:59:11 +0100

On Wed, Jul 07, 1999 at 12:06:10PM +0200, Marc van Selm wrote:

> >Greetings all--
> >
> >Has anyone figured out how to make squid use more than one ethernet card
> >to retrieve objects into it's cache?
> >
> >I have a unix box (linux rh6) running squid (latest) with a multiport
> >ethernet card (10mb) behind a switch and a router tied to a T3. I would
> >like squid to round robin/load balance the traffic amongst the 4 ports on
> >the multiethernet card if possible as I have an obscene amount of traffic
> >that I pass through this box.

This isn't squid's job.

First, you need to get the requests spread across the four ports as evenly
as possible. In the absence of dedicated hardware, the best you can manage
here is to set up a RR for your cache with all four interfaces listed,
something like

wwwcache.some.where. IN A 100.10.1.1.
wwwcache.some.where. IN A 100.10.1.1.
wwwcache.some.where. IN A 100.10.1.1.
wwwcache.some.where. IN A 100.10.1.1.

That way, any machines which lookup that host will use one of the four in
preference to the others.

You can also write a proxy.pac configuration that splits the load up using a
hash function -- see the archives of this list for more discussion.

That takes care of incoming traffic. Outgoing traffic is more difficult.
Essentially, you need your O/S to be capable of load balancing outgoing
traffic across multiple ports. Solaris does this using interface groups --
packets are sent out in a round robin fashion from each member of the group.
I don't know if Linux supports something similar, I guess it may.

> I'd say a dedicated 100Mbps full duplex switch port will suit you better.

I'd concur. Balancing across multiple interfaces is quite messy and there
are many WWW sites out there using cookies for authentication, and they use
the IP address of the connecting browser (ie, your squid cache) in the
cookie. These sites get very confused when they see requests from multiple
IP addresses (caused by this round-robin outgoing traffic).

Cheers,

Chris

-- 
SQUID Frequently Asked Questions -> http://squid.nlanr.net/Squid/FAQ/FAQ.html
-----------------------------------------------------------------------------
Chris Tilbury, UNIX Systems Administrator, IT Services, University of Warwick
PHONE: 024 7652 3365 / FAX: 024 7652 3267 / MAIL: Chris.Tilbury@warwick.ac.uk
Received on Wed Jul 07 1999 - 05:03:42 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:47:18 MST