httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Akins <>
Subject Re: [PATCH] mod_disk_cache deterministic tempfiles
Date Wed, 17 Aug 2005 20:45:19 GMT
Colm MacCarthaigh wrote:
> On Wed, Aug 17, 2005 at 04:33:24PM -0400, Brian Akins wrote:
>>But like Graham said, ultimately, I don't think it's worth it.
> I got the opposite from what Graham said, but may have mis-read.

Or i did...

> Depends on the environment. For a proxy, being able to serve in-flight
> content to multiple requesters is considered a major feature. 
> If 10 proxy clients request the latest service-pack at the same time,
> is it going to be faster or slower to have 10 upstream requests or
> 1 pooled? 

Sure.  It really depends upon the exact application.  In most reverse 
proxy situations, it probably wouldn't help as much as what I proposed. 
  In "normal" proxy, it could reap huge rewards.

some pseudo code:

if(stat(tempfile)) {
	if(size - lastoffset > 0) {
		newbucket(lastoffset, size - lastoffset);
		lastoffset = size;
        } else {
		/*sleep? evil I know....*/

If the correct size was stored in the header file (it's there, don't 
know if it's correct), then you could just compare it to stat.  That way 
you wouldn't need temp files as you suggested earlier.


Brian Akins
Lead Systems Engineer
CNN Internet Technologies

View raw message