httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: restructuring the server (was Re: virtual host again)
Date Thu, 27 Apr 1995 09:49:04 GMT
   Date: Thu, 27 Apr 1995 09:36:24 +0200
   From: Andy Polyakov <appro@fy.chalmers.se>

   BTW, guys! Has anybody ever considered to cache ~user aliases
   translations and access evaluations? Latter should do really nice job
   for latex2html documents and other <IMG> junkies.

   Andy.

In the non-forking server, we actually do that already, on a
per-process basis (unless Rob's changed it).  Surprise!

How did this happen?  Well, every /~foo is entered into the aliases
table as it's encountered, for the sake of unmunge_name.  When the
same server process sees /~foo again (with the same user foo), the
alias is used and the passwd-file lookup is bypassed.

For NCSA 1.4, this actually caused a very nasty bug, because the
aliases were stored in a fixed-size table which overflowed after
seeing enough /~foos.  As a result, NCSA has to ditch these new
aliases after every transaction to keep them from piling up.

Apache, however, stores them in a malloc'ed linked list, so overflow
of a fixed-length table is not a problem.  And so, when I was first
merging Brandon's non-forking code with our own stuff, I decided not
to keep the /~foo aliases around, precisely for this caching effect. 

(Incidentally, this cache is flushed along with the rest of the alias
database when the rereads the config files, as it properly should be).

Serendipity is fun when it happens...

rst

Mime
View raw message