Re: [squid-users] Inelegant routing based on file size

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Thu, 16 Oct 2008 12:10:34 +1300 (NZDT)

>
> Hi All
>
> I am looking to route download traffic based on file size of the download
> requests. If a user in our network was to download a 10mb file, he gets
> routed through link 1. If a user requests a 100mb file download, he gets
> routed through link 2.
>
> How is this achieved?

It can not. File size is not known until after the file starts arriving.
Sometimes not even until it has finished arriving.

The best you may possibly do is create a custom external ACL helper to
scan store.log for previous file sizes of requested URL. Then use
tcp_outgoing_address based on a best-guess.

This however breaks completely on:
* new and unknown URL,
* changed URLs,
* dynamic URL (very common!),
* and most websites updated by their webmaster between your visits
    (almost as common as dynamic URLs).

Amos
Received on Wed Oct 15 2008 - 23:10:39 MDT

This archive was generated by hypermail 2.2.0 : Thu Oct 16 2008 - 12:00:04 MDT