Re: [squid-users] Re: how to use tproxy + iptables load balancing

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 11 Oct 2013 01:11:23 +1300

On 11/10/2013 12:13 a.m., Alfredo Rezinovsky wrote:
> El 10/10/13 05:07, Ding Guigeng escribió:
>> Mohsen Dehghani wrote
>>> Hi team
>>> I am planning to install multiple instances of squid on a machine as a
>>> frontend. Tproxy is now working fine on a single instance machine.
>>> No I want to run multiple instances and use this help to load balance
>>> between them:
>>>
>>> http://wiki.squid-cache.org/ConfigExamples/ExtremeCarpFrontend#Frontend_Bala
>>>
>>> ncer_Alternative_1:_iptables
>>>
>>> does anybody have any experience doing this?
>>>
>>> I think the key rule in tproxy iptables is:
>>> iptables -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY
>>> --tproxy-mark
>>> 0x1/0x1 --on-port 3129
>>>
>>> I have tried some ways of combination of this with the example
>>> without any
>>> success.
>>>
>>> thanks
>> Hi Mohsen,
>> have you installed success now?
>> i am also planning to install it with iptables balance.
>> now my squid server running with 3 workers well.but the usage of per
>> core is
>> uneven.
>>
>
> The load balancing in the workers case is done by the kernel
> And yes, is't more distributed than "balanced"
>

It is load balanced by connection (TCP SYN packet). So bears no relation
to the amount of CPU consumed by the worker in processing the HTTP
request(s) inside it.

Amos
Received on Thu Oct 10 2013 - 12:11:32 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 10 2013 - 12:00:05 MDT