map@iphil.net writes:
>Hi,
>
>Duane Wessels wrote:
>> So as a cache administrator, you're not in violation of the HTTP protocol.
>> The users behind your cache still get the objects from the unfriendly sites,
>> but perhaps with considerable delay. In situations where bandwidth is
>> relatively plentiful the priority/QOS effects shouldn't be noticable.
>
>Is it feasible to throttle web server replies to outbound HTTP requests?
>Wouldn't it chew up CPU? (i.e., what are the internals of usleep(3)?)
No, usleep() is not an option.
One way would be to limit the total number of HTTP transfers
in progress at any given time. So you have a queue of requests
which have not yet been forwarded to the source or parent. This
queue would be prioritized based on various things, including
the "hit rate" you're getting off this server.
Another way would be to limit the throughput for some class of
requests. Then you just don't read() from the socket so often,
even though data is available and already in your system's socket
buffers.
Pure "hit rate" is probably not the right metric. Instead you might
want something like the "un-hit rate" which is how often you did NOT
get a hit when you really should have (if the site was
cache-friendly).
Duane W.
Received on Wed Dec 18 1996 - 10:36:33 MST
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:55 MST