httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@organic.com>
Subject Re: NameVirtualHost
Date Mon, 27 Oct 1997 20:11:52 GMT
At 10:42 AM 10/27/97 -0800, Dean Gaudet wrote:
>On Sun, 26 Oct 1997, Brian Behlendorf wrote:
>> Dean, on hashing: I think you could expand the ip and port part so that
>> each possibility is hashed whenever it's left nonspecific.  I.e. let's say
>> there's 5 IP addresses and a tuple of "bong.com::80"; hash 5 different
>> tuples, each with the same config.  Likewise you could treat
>> "bong.com:a.b.c.d:" by hashing for as many ports are listening. 
>
>I never said hashing was impossible, just difficult in this scheme.  Or at
>least that's what I meant to say.  By difficult I mean that there are far
>too many special cases that need to be dealt with, and so we'll probably
>mess it up.

Care to mention any?

>> Thus for every port and IP combination, you could get a list of valid
>> hostnames or regex matches.  Have two tables - a hash table with exact
>> hostnames, and a linear list of matching "*.host.com" file.  Search the
>> hash table, then search the linear list.  I have *no* problem telling folks
>> that if they want to optimize their vhost configurations, they should avoid
>> "*.host.com" and explicitly list all possibilities.  You could also go
>> crazy and ask DNS for all possible hosts at ".host.com" but I don't think
>> that's necessary :)
>
>It's not necessary to tell them to avoid *.host.com.  See my proposal for
>a better solution.

I saw it; we could certainly do it that way too.  The essence of my
proposal was, hash on the IP and port # first, since those can be
enumerated completely, and then a combination of hashing and linear search
for hostnames.  

>regexs are evil in this setting. 

What, you don't want to be able to specify "ServerName
/www\..*wired\.com/"?  :)

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"it's a big world, with lots of records to play." - sig   brian@organic.com

Mime
View raw message