httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Hartill <r...@imdb.com>
Subject Re: NameVirtualHost
Date Mon, 27 Oct 1997 12:39:19 GMT
On Sun, 26 Oct 1997, Brian Behlendorf wrote:

> >foreach x:y:z (Service) {
> > score = 0
> > if  (x!='' && x!=a) || (y!='' && y!=b) || (z!='' && z!=c)
 do next
> >
> > score = 1
> > if  x!=''   score += 1   # a matching hostname is something to cheer about.
> > if  z!=''   score += 2   # a matching port is better than a matching
> hostname.
> > if  y!=''   score += 4   # a matching IP is always the best choice.
> >}
> 
> I don't like this.  I think it should be according to order in the config
> file.  That's got less guesswork in it, I think, and someone might want
> ports to supercede IP #.  I.e. if you had
> 
> ::80		port80
> :a.b.c.d:	abcd
> 
> in a row, then all requests to port 80 on any IP would get the port80
> configuration, and all ports on a.b.c.d *except* port 80 would get abcd.  I
> can think of situations where this makes sense.

That looks good at first glance.

At what point does hashing become worthwhile ? - how big a table ?
and how many people are going to end up benefiting from a hash compared
to losing out from its overhead ?

I would expect the vast majority of configs to be simple enough to
implement in 0-5 lines using the '::' notation. Scanning such a
small table should be efficient compared to hash lookups.

Straw poll, how many '::' lines would folks reading this mail need
for their configs ?

I have ~4 'Host:' based servers, port 80 only, 1 IP address, no ServerPaths,
so and I can manage with ~5 lines looking something like

a.imdb.com:: a
b.imdb.com:: b
c.imdb.com:: c
d.imdb.com:: d
:: a

In this case, I'd order a,b,c,d  so the most used hostname appears first.


--
Rob Hartill                              Internet Movie Database (Ltd)
http://www.moviedatabase.com/   .. a site for sore eyes.


Mime
View raw message