httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Enrico Weigelt <weig...@metux.de>
Subject Re: trouble w/ perchild MPM
Date Wed, 27 Nov 2002 05:55:13 GMT
On Wed, Nov 27, 2002 at 01:41:14AM +0000, James Ponder wrote:

<snip>
> I meant 1 or more processes with 1 or more threads each.  Has any work
> been done on testing whether it's best to have 100 processes listening or
> 10 processes with 10 threads each all listening, or 10 processes with 10
> threads each with one listener thread per process, etc. etc.?  I was
> vague because I don't know best practice.
perhaps we could write an test application to probe it out.

<snip>
> I'd like to ditch the current model of using suexec, to a perchild model.
This is also my plan. I'm using mod_php w/ connection pooling etc. The
server processes currently run as nobody, but now i'm getting some 
more customers on my hosts and some wann access their files from 
php scripts. suexec is too slow, since it forks and execs, which 
is quite expensive, much more expensive than passing fds.

I'm currently thinking about an completely new approach:

The Server Layout is:

                           +-----------------------+
                           | Master Process (root) |
                           +-----------------------+
                             |           |  |  |
			     |           |  |  |
    primary      +----------------+      |  |  | 
    listen   ==> |  Multiplexer   |      |  |  |
    socket       |  (wwwrun)      |      |  |  \-----------\
                 +----------------+      |  \-----------\  |
                      |  |  |            \-----------\  |  |
                      |  |  |                        |  |  |
                      |  |  |  +-------------------+ |  |  |
                      |  |  \--| Server 0 (user A) |-/  |  |
		      |	 |     +-------------------+    |  |
		      |	 |                              |  |
		      |	 |     +-------------------+    |  |
		      |	 \-----| Server 1 (user B) |----/  |
		      |	       +-------------------+       |

The lines are marking control connections between the processes.
On startup we first have the master process, which forks the multiplexer(s)
and the servers. The multiplexer server listens on an set of sockets
for accepting incoming connections. Once accepted an connection, the
mux looks up the right server for the request and passes the connection
to it, this server then processes the request as usual.

Each of the processes may work w/ multiple threads, perhaps they
could also be configured individualy for each process.

This concept has one possible leak w/ persistent connections, 
when an client sends requests for different vhosts over the same
persistant link. (is this allowed by the http spec?)

Well, I'll call it the mux-mpm ... 
btw: how to add an new mpm ?

~-n
--
Bestes Mittel gegen Mailviren: Outlook löschen.
---------------------------------------------------------------------
 Enrico Weigelt    ==   metux ITS 
 Webhosting ab 5 EUR/Monat.          UUCP, rawIP und vieles mehr.

 phone:     +49 36207 519931         www:       http://www.metux.de/     
 fax:       +49 36207 519932         email:     contact@metux.de
 cellphone: +49 174 7066481	     smsgate:   sms.weigelt@metux.de
---------------------------------------------------------------------
 Diese Mail wurde mit UUCP versandt.      http://www.metux.de/uucp/

Mime
View raw message