Re: What's the best configuration for this setup?

From: Daniel O'Callaghan <danny@dont-contact.us>
Date: Fri, 22 Nov 1996 23:11:00 +1100 (EST)

On Fri, 22 Nov 1996, Ross Wheeler wrote:

> I noticed a particularly unpleasant problem I'd appreciate ANY input on,
> and that is that when someone requests a page through our proxy, and it
> is NOT cached, it checks the "parent". IF upstream has it, (and here's
> the catch), it comes roaring down the 128K and consumes most of our
> bandwidth while it does so. If it's a large file (big web page, or worse,
> a large file that's being FTPd), this can go on for quite some time.

This was discussed on freebsd-hackers not so long ago. It is possible to
bandwidth limit connections by a simple

while () {
        read();
        sleep();
}

If course, sleep(), or usleep() are not appropriate for squid, but how
hard would it be to implement an algorithm which says "OK, I'm supposed
to read max 3000 chars/sec; I just read 1500 chars; I must not read again on
this connection for at lease 500 ms."??

My guess is that it would need a bandwidth and an "earliest time for next
read" to be stored for each (outbound?) tcp connection.

One could also limit write()s so that delivery is throttled.

Danny
Received on Fri Nov 22 1996 - 04:11:29 MST

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