You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Harris <dh...@drh.net> on 1999/06/11 15:59:10 UTC

listen ipaddrs:80 vs *:80

Question kind of relating to mass hosting:

How much worse is this:

     Listen ipaddr:80
     <VirtualHost ipaddr:*>
     bla bla bla
     </VirtualHost>

repeated for each virtual host, compared to:

     Listen *:80

with just

     <VirtualHost ipaddr:*>
     bla bla bla
     </VirtualHost>

repeated for each virtual host.

I understand that the first causes one socket to be opened and the second
causes one socket to be opened for each virtual host. Well, this makes a
larger call to select, but is this a problem? Are all those sockets eating
up file descriptors? This could cause apache problems or also linux kernel
problems, I guess.

I've been using the first method just because it seemed easiest to get
working. It works just fine with my relatively small test setups, but I'm
afraid that it will not scale. Perhaps I should just setup a box with a few
class C's and test it out...

I assume you people running a few thousand virtual domains in a server are
using the second method with a "Listen *:80". This correct?

 - David Harris
   Principal Engineer, DRH Internet Services



Re: listen ipaddrs:80 vs *:80

Posted by Dean Gaudet <dg...@arctic.org>.
The wildcard address is better.

Dean

On Fri, 11 Jun 1999, David Harris wrote:

> 
> Question kind of relating to mass hosting:
> 
> How much worse is this:
> 
>      Listen ipaddr:80
>      <VirtualHost ipaddr:*>
>      bla bla bla
>      </VirtualHost>
> 
> repeated for each virtual host, compared to:
> 
>      Listen *:80
> 
> with just
> 
>      <VirtualHost ipaddr:*>
>      bla bla bla
>      </VirtualHost>
> 
> repeated for each virtual host.
> 
> I understand that the first causes one socket to be opened and the second
> causes one socket to be opened for each virtual host. Well, this makes a
> larger call to select, but is this a problem? Are all those sockets eating
> up file descriptors? This could cause apache problems or also linux kernel
> problems, I guess.
> 
> I've been using the first method just because it seemed easiest to get
> working. It works just fine with my relatively small test setups, but I'm
> afraid that it will not scale. Perhaps I should just setup a box with a few
> class C's and test it out...
> 
> I assume you people running a few thousand virtual domains in a server are
> using the second method with a "Listen *:80". This correct?
> 
>  - David Harris
>    Principal Engineer, DRH Internet Services
> 
> 
>