You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Gregory Keefe <ke...@keefeg.com> on 2001/04/07 23:29:56 UTC

Redirect directive

Hello,

Has anyone considered permitting a hash database (instead of, or in addition to, the flatfile setup) for redirect directives?  The advantage would be super-fast lookups by Apache of a URL redirection target, without being responsible for keeping the data in memory (leaving it up to the Unix kernel's buffer cache instead).  This would be good for sites that have huge lists of redirect statements.

A candidate for the hash file program could be Dan Bernstein's CDB package ( http://cr.yp.to/cdb.html ).

Thanks,
Greg Keefe
keefeg@keefeg.com


Re: Redirect directive

Posted by "Roy T. Fielding" <fi...@ebuilt.com>.
> Has anyone considered permitting a hash database (instead of, or in
> addition to, the flatfile setup) for redirect directives?  The advantage
> would be super-fast lookups by Apache of a URL redirection target,
> without being responsible for keeping the data in memory (leaving it up
> to the Unix kernel's buffer cache instead).  This would be good for
> sites that have huge lists of redirect statements.

Redirects are typically chosen by name prefix or regular expression.
I don't know how to look those up via a hash table.  A fixed-string
redirect could be done by hash lookup, but that would only improve
performance if we eliminated the prefix lookups.  In other words, a
separate module that could be plugged-in instead of mod_alias or
mod_rewrite.

....Roy