Re: [squid-users] Max throughput of CARP Proxy

From: Markus Meyer <markus.meyer_at_koeln.de>
Date: Thu, 04 Feb 2010 16:53:48 +0100

Kinkie schrieb:

Hi Kinkie,

> you run two instances, say one on port 80 and one on port 81.
> Then:
> iptables -t nat -A PREROUTING -m conntrack --ctstate
> RELATED,ESTABLISHED -j ACCEPT
> iptables -t nat -A PREROUTING -p tcp -m statistic --mode random
> --probability 0.5 \
> -m tcp --dport 80 -j REDIRECT --to-ports 81
>
> For more instances, use more ports, and replicate the second line as
> many times as needed (also remember to change the probability).

Interesting idea. Since there are lots of free CPU-cycles to burn I will
look into this.

> squid 2.7 supports a '-I' command-line option, which will make it
> accept requests on stdin instead of a socket. I recall seeing (but
> unfortunately can't find) a PERL script which performed the network
> part of accepting a request, and then maintained a farm of squid
> servers to which it passed requets this way.

I'm not a big fan of constructs like this one. Also I don't have the
time to build this "server" myself.

> The iptables method is probably more efficient, as the load-balancing
> is done directly in the kernel.

This definitely looks promising. If my time allows it I'll give it a try.

Thanks, Markus
Received on Thu Feb 04 2010 - 15:54:10 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 04 2010 - 12:00:04 MST