Re: DELAY_HACK

From: David Luyer <[email protected]>
Date: Tue, 11 Feb 1997 22:12:40 +0800 (WST)

On Tue, 11 Feb 1997, Igor Vinokurov wrote:
>re,
>
>Anybody can suggest me how to use DELAY_HACK in squid?

You might want to look at the DELAY_HACK stuff in

  ftp://uniwa.uwa.edu.au/pub/squid

specifically

  diff-1.1.6-1.1.6.ucs

It implements a much more versatile DELAY_HACK than stock squid. We've
been using this code for some time (barely modified since 1.0.x).

There are 3 bandwidth restrictors in this version:

  selected via delay_child_access ACLs:

  * as a pool, restricted as per delay_child_restore and delay_child_max

  [we use this to limit a child cache.]

  selected via delay_access ACLs:

  * as a pool, restricted as per delay_restore and delay_max
  * as individual hosts, restricted as per delay_host_restore and
                          delay_host_max

  [we use this to limit dialup users and students.]

quick explanation:

  each "pool" gets delay_restore bytes per second up to a maximum of
  delay_max. when this is empty, reads are deferred for gets for the
  particular host.

caveat 1:

  delay_host_restore and delay_host_max assume that if the last 16 bits of
  a host IP is unique, we have a unique client IP. this shouldn't trouble
  too many people, if it does you they can fix it. people who need
  delay_access type stuff presumably know what they're doing.

caveat 2:

  I've only implemented this in the select() stuff. if using poll() then
  you'd have to merge it into the poll() stuff. (thats IIRC).

I haven't looked at the DELAY_HACK stuff in stock squid much recently, I
don't believe it does much of use.

David.
Received on Tue Feb 11 1997 - 06:36:58 MST

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