Re: Save 15% on your bandwidth...

From: Brian Denehy <>
Date: Fri, 20 Sep 1996 13:29:42 +1000

| On Sun, 15 Sep 1996, Gudmundur Ragnar wrote:
| > > > > Why not just add a special rule in squid so that netscape
| > > > > distributions get cached *much* longer? ;-)
| > > >
| > > > The point is that there are many mirrors around the world and our
| > > > users tend to visit them all.
| > >
| > > Is there anyway that I could redirect all requests to
| > > to the same ftp site e.g.,
| > > and then write a ttl_pattern rule so that this
| > > site only stays longer.
| >
| > We have a real "problem/opertunity" and should try to find a solution
| > that is both simple and complete.
| some sort of regexp url rewriting would be useful:

From the 1.1 Release notes (still at beta3, but pretty stable)

URL Redirector
Squid now has the ability to rewrite requested URLs. This is implemented
as an external process, much like the dnsservers. Every incoming URL
is written to a 'redirector' process which then returns a new URL, or
a blank line to inidicate no change.

The redirector program is NOT provided in the Squid package. Currently,
it is up to the individual users to write their own implementation. For
testing, this very simple Perl script can be used:

    print while (<>);

The redirector program must read URLs (one per line) on standard input,
and write rewritten URLs or blank lines on standard output. Note that
the redirector program can not use buffered I/O. Additional information
is written after the URL which a redirector can use to make a decision.
The input line consists of four fields:

    URL ip-address/fqdn ident method

The ip-address is always written, the fqdn will be provided if
available (otherwise it will be "-"). Similarly, the user ident will
be provided if available (i.e. 'ident_lookup on' in config file). The
method is GET, POST, etc..

Note that when used in conjunction with the -V option (on a virtual hosted
machine) this provides a mechanism to use a single Squid cache as a front
end to numerous servers on different machines. URLs written to the
redirector will look like:

The redirector program might be this Perl script:

    while (<>) {

You may receive statistics on the redirector usage by requesting the
following 'cache_object' URL:

    % client cache_object://localhost/stats/redirector

Brian Denehy,			   Internet:
IT Services 		  	   MHSnet:
Australian Defence Force Academy   UUCP:!uunet!!!bvd
Northcott Dr. Campbell ACT Australia 2600  +61 6 268 8141  +61 6 268 8150 (Fax)
Received on Thu Sep 19 1996 - 20:30:21 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:03 MST