On 11/04/11 16:52, Supratik Goswami wrote:
@Amos
I understand the "policy routing" and also checked with
tcp_outgoing_address, but I am not able to figure
out how can I use acl to filter the large traffic and use it with the
tcp_outgoing_address.
Currently with "reply_body_max_size 15 MB officelan" I am able to
discard large downloads, but can you
please tell me instead of discarding is there a way I can use the acl
with tcp_outgoing_address to redirect
the download through Link-2 (using policy routing) ?
You must deduce the future size of data transfer and make whatever ACL
tests tcp_outgoing_address needs based only on the *request* details.
For things such as ...
* POST or PUT the size is in the Content-Length header.
* CONNECT you will have to make a judgement call, your logs should
show some avg size trend.
* HEAD will usually never reach 1 MB, though some can be amazingly
high in the KB range.
* GET is where it gets tricky. You will have to select based on the
URL. The usual way is to just assume that multimedia, executable or
archives file types are the big ones and the rest small.
Perfection is not possible here, but the above generalizations will go
along way towards biasing the traffic towards your desired "large" link.
Sorry if I'm being a bit vague. The exact rules will depends very
specifically on your clients and what parts of the web they visit.
Well, thats how to do it in Squid at the point of outbound. The
alternative if you want better reliability is ignoring Squid entirely
and doing load balancing at the operating system packet level.
Amos
--
Please be using
Current Stable Squid 2.7.STABLE9 or 3.1.12
Beta testers wanted for 3.2.0.6