Mailing List Archive

Virtual Hosts patch
I just reupped a new E55_virtual_hosts.txt. Seems there were some
missing changes.

-Randy
Re: Virtual Hosts patch [ In reply to ]
On Apr 9, 11:46am, David Robinson wrote:
} Subject: Re: Virtual Hosts patch
} I have two problems with the virtual httpd patch.
}
} Firstly, why not run separate httpds for each virtual host?
} Administration would be easier, and the changes needed to support it would
} be simpler. You would add a LocalAddress option to httpd.conf which would
} set the address that bind() uses, defaulting to 'any'. (It would not even
} need to be #ifdef'able.)

In fact E55 supports this also. It will just do a bind to
port 80 on a single IP address. It works either way, but I've
done more testing with virtual hosts. Check out the code.

Why don't I run seperate httpds? I did for a while. Think about
when non-forking is standard? You want n*m processes or just m? (n
is number of virtual hosts, m is number of children)? I'd
prefer m by a long shot. Also name cache would be shared, etc.
All around much better on resources.

} Secondly, I don't like the 'user interface'. Using virtual hosts requires
} an understanding of the DNS and TCP/IP that most people don't have.
} The current patch really confuses the issue by pretending that it is
} selecting on the hostname the user used, whereas it is really selecting
} on the ip-address the browser uses. So:
} i. You must be able to enter the IP address of the virtual host in
} the config option. Using the hostname is only a convenience.

Good idea, this should be documented.

} ii. It must be presented as a switch on the IP address in the documentation.

huh? I don't get what you are asking here.

} David. -1.
Re: Virtual Hosts patch [ In reply to ]
On Apr 9, 3:43pm, David Robinson wrote:
} Subject: Re: Virtual Hosts patch
} >Why don't I run seperate httpds? I did for a while. Think about
} >when non-forking is standard? You want n*m processes or just m? (n
} >is number of virtual hosts, m is number of children)? I'd
} >prefer m by a long shot.
} But why would m be the same in both cases? I'd change m to m/n so that the
} total number of processes are the same.

For the simple case sure, you can do that. But one of the httpds
I run has 4 virtual hosts now, and I expect 15-20 in a couple
months. I'd like to be able to set a value of m that is less than
n in that case. It is much more versitile than the httpd per IP address.

BTW running seperate servers aso has the IP address problem you
mentioned for virtual hosts. The name and number thing are the
same, I don't see why you prefer a number thinking about it more.
This is an advanced feature, like content negotiation. And
yes, you can hang yourself. I guess people will get the
idea when the config or bind fails with a message.
Re: Virtual Hosts patch [ In reply to ]
Date: Sun, 9 Apr 95 15:43 BST
From: drtr@ast.cam.ac.uk (David Robinson)
Precedence: bulk

But why would m be the same in both cases? I'd change m to m/n so that the
total number of processes are the same.

David.

Because if processes are dedicated to each address, they can't
dynamically adjust to the actual load pattern (which may have peaks on
different virtual hosts at different times). If virtual host A is
getting pounded, or has a lot of slow clients, and virtual host B is
idle, you'd want most of the server processes working for A, and vice
versa when the situation is reversed. A common pool allows for this;
separate pools don't.

(Given the peakiness of web loads, most processes in a server pool are
likely to be idle most of the time --- they're there anyway so the
server doesn't have to fork, and get even slower, in response to
transient load peaks).

Sorry, David, but I think Cliff's right about this.

rst
Re: Virtual Hosts patch [ In reply to ]
I have two problems with the virtual httpd patch.

Firstly, why not run separate httpds for each virtual host?
Administration would be easier, and the changes needed to support it would
be simpler. You would add a LocalAddress option to httpd.conf which would
set the address that bind() uses, defaulting to 'any'. (It would not even
need to be #ifdef'able.)

Secondly, I don't like the 'user interface'. Using virtual hosts requires
an understanding of the DNS and TCP/IP that most people don't have.
The current patch really confuses the issue by pretending that it is
selecting on the hostname the user used, whereas it is really selecting
on the ip-address the browser uses. So:
i. You must be able to enter the IP address of the virtual host in
the config option. Using the hostname is only a convenience.
ii. It must be presented as a switch on the IP address in the documentation.

David. -1.
Re: Virtual Hosts patch [ In reply to ]
>Why don't I run seperate httpds? I did for a while. Think about
>when non-forking is standard? You want n*m processes or just m? (n
>is number of virtual hosts, m is number of children)? I'd
>prefer m by a long shot.
But why would m be the same in both cases? I'd change m to m/n so that the
total number of processes are the same.

David.
Re: Virtual Hosts patch [ In reply to ]
>Sorry, David, but I think Cliff's right about this.
That's ok -- I'm convinced.

I don't think it need #ifdef on APB_BIND_ADDRESS (which enables the
feature I was requesting), as that adds hardly any extra code.
(Unlike APB_VIRTUAL_HOST -- and what does APB mean?)

David.