You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Tony Sanders <sa...@bsdi.com> on 1996/04/25 17:02:58 UTC

Local Cache's and Port numbers

I'm told that at least one www cache (Harvest) expects the local
server to live on some alternate port (e.g., port 81).  However,
if you just configure apache with ``Port 81'' then the server and
various CGI scripts will return URLs that contain the Port 81 in
them (which causes users to bypass the cache).

Apache needs a configuration option to tell it what port to
pretend to be on for the purpose of auto-URL generation and
for passing into CGI scripts.  Sometime like:
	Port 81
	ButPretendToBeOnPort 80

Unless someone else can think of a more clever solution...

Re: Harvest

Posted by Dean Gaudet <dg...@hotwired.com>.
In article <Pi...@fully.organic.com> you write:
>Very, very silly design decision on Harvest's part.

Speaking of Harvest design decisions... ever notice things poking at
udp port 7 on your firewalls?  Say hello to harvest caches trying to
"ping" you to get an idea of the transfer rate to your site... so they
can decide which of the distributed caches to load the page from.

Dean

Re: Local Cache's and Port numbers

Posted by "James H. Cloos Jr." <cl...@jhcloos.com>.
Tony> I'm told that at least one www cache (Harvest) expects the local
Tony> server to live on some alternate port (e.g., port 81).  However,
Tony> if you just configure apache with ``Port 81'' then the server
Tony> and various CGI scripts will return URLs that contain the Port
Tony> 81 in them (which causes users to bypass the cache).

Just as a side note, this is of course limited to use of Harvest as an
accelerator (typically running on the same box as the server), rather
than as a proxy.

Hmmm.  I wonder how much trouble it would be to add a shared-mem cache
to Apache, so that the most recently accessed docs don't need to be
grabbed from disk again?  Might still need to do a stat(2) call to see
if the file changed, and things like CGI & SSI output prob shouldn't
be cached (except, perhaps, if you are using XBitHack Full and the
file is both u+x and g+x).

has anyone been keeping a record of all the great ideas that get
mentioned here during the feature freezes?  :)

-JimC
-- 
James H. Cloos, Jr.	<URL:http://www.jhcloos.com/~cloos/>
cloos@jhcloos.com	Work: cloos@io.com
LPF,Usenix,SAGE,ISOC,ACLU


Re: Local Cache's and Port numbers

Posted by Tony Sanders <sa...@bsdi.com>.
Brian Behlendorf writes:
> On Thu, 25 Apr 1996, Tony Sanders wrote:
> > I'm told that at least one www cache (Harvest) expects the local
> > server to live on some alternate port (e.g., port 81).  However,
> > if you just configure apache with ``Port 81'' then the server and
> > various CGI scripts will return URLs that contain the Port 81 in
> > them (which causes users to bypass the cache).
> 
> Very, very silly design decision on Harvest's part.  Note that this is 
I don't see how one would otherwise do it but ok.

> not really a "cache" in the form we're used to, but an "accelerator" - it 
Yes, that is what they call it.

> sits in front of a regular HTTP server and handles all requests to that 
> server.  I have big questions about this model, but for some applications 
> I can see its merit (though I'd like to see a comparison between it and a 
> stripped-down apache in terms of performance...)
> 
> > Apache needs a configuration option to tell it what port to
> > pretend to be on for the purpose of auto-URL generation and
> > for passing into CGI scripts.  Sometime like:
> > 	Port 81
> > 	ButPretendToBeOnPort 80
How about this instead:

    MasqueradeAs http://other.machine.name:80/

As it has other interesting applications as well...

> > Unless someone else can think of a more clever solution...
> 
> Run Harvest on another machine with two ethernet interfaces, the web 
> server on one side and the rest of the internet on the other, and have it 
> act as a man-in-the-middle?  Hmm....
Nope -- not a general solution

> Or, wait - bind Apache to port 80 on 127.0.0.1, and Harvest on port 80 on 
> the actual IP address?
Hmmmm... that's an interesting idea.  And if Harvest could give
you the right ``Host:'' it might even be enough for VirtualHost's
implemented on the outside with IP addresses [though I have no idea
if Harvest supports that or not].

> 	Brian
> 
> --=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
> brian@organic.com  |  We're hiring!  http://www.organic.com/Home/Info/Jobs/
> 

Re: Local Cache's and Port numbers

Posted by Brian Behlendorf <br...@organic.com>.
On Thu, 25 Apr 1996, Tony Sanders wrote:
> I'm told that at least one www cache (Harvest) expects the local
> server to live on some alternate port (e.g., port 81).  However,
> if you just configure apache with ``Port 81'' then the server and
> various CGI scripts will return URLs that contain the Port 81 in
> them (which causes users to bypass the cache).

Very, very silly design decision on Harvest's part.  Note that this is 
not really a "cache" in the form we're used to, but an "accelerator" - it 
sits in front of a regular HTTP server and handles all requests to that 
server.  I have big questions about this model, but for some applications 
I can see its merit (though I'd like to see a comparison between it and a 
stripped-down apache in terms of performance...)

> Apache needs a configuration option to tell it what port to
> pretend to be on for the purpose of auto-URL generation and
> for passing into CGI scripts.  Sometime like:
> 	Port 81
> 	ButPretendToBeOnPort 80
> 
> Unless someone else can think of a more clever solution...

Run Harvest on another machine with two ethernet interfaces, the web 
server on one side and the rest of the internet on the other, and have it 
act as a man-in-the-middle?  Hmm....

Or, wait - bind Apache to port 80 on 127.0.0.1, and Harvest on port 80 on 
the actual IP address?

	Brian

--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
brian@organic.com  |  We're hiring!  http://www.organic.com/Home/Info/Jobs/