Re: [squid-users] Load balancing on single machine

From: Kinkie <kinkie-squid@dont-contact.us>
Date: Mon, 07 Jul 2003 10:54:33 +0200

Marc Elsen <marc.elsen@imec.be> writes:

> Dusan Djordjevic wrote:
>>
>> Monday 07 July 2003 10:56, Marc Elsen:
>> > > I plan to install few instances of Squid on one multiprocessor box
>> > > and balance load between them. I plan to use LinuxVirtualServer
>> > > for it. Do someone have that kind of solution ? What load
>> > > balancing you suggest ? Any other recommendation ?
>> > Do you have an idea of the sustained http reqs/sec , your squid
>> > has to deal with ?
>>
>> Yes. I need specific non-caching proxy. There are 3000-5000 requests per
>> second. Currently I have one 4CPU box i would like to deploy.
>
> Hm, I think I read that squid can give you a max. of about 300
> reqs/sec.
> As stated before on the list squid on itself can not make
> use of more then one cpu.
>
> So I think in a virtual server setup, you may be better off with 4
> separate boxes (probably), I think it would give you more
> flexibility and squid service uptime, if one box is down,
> for instance.

If you're running on Linux, there is a trick which can balance
between 2 squid instances running on the same box, discriminating between
the two depending on the client IP address.
Run the second instance on some other http_port (i.e. 4128) and add this
iptables rule:

iptables -t nat -A PREROUTING -s 0.0.0.0/0.0.0.1 -p tcp \
         --destination-port 3128 -j REDIRECT --to-ports 4128

More instances (in powers of 2) should be possible using similar tricks.

-- 
	kinkie (kinkie-squid [at] kinkie [dot] it)
	Random fortune, unrelated to the message:
Can't act.  Slightly bald.  Also dances.
		-- RKO executive, reacting to Fred Astaire's screen test.
		   Cerf/Navasky, "The Experts Speak"
Received on Mon Jul 07 2003 - 02:54:33 MDT

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