You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by imran badr <im...@caveonetworks.com> on 2001/05/18 01:28:56 UTC

New to Apache. A question.

Hi,
I am new to this group. I have a question about Apache web server. Does it
forks a new process to handle a new http/https connection or create a new
thread??

Thanks,
Imran Badr.

>>>

-----Original Message-----
From: Cliff Woolley [mailto:cliffwoolley@yahoo.com]
Sent: Thursday, May 17, 2001 4:24 PM
To: new-httpd@apache.org
Subject: Re: cvs commit: httpd-2.0 STATUS


On Thu, 17 May 2001 rbb@covalent.net wrote:

> >   +          - dup the cached apr_file_t into the request pool on each
> >   +            request so that the MMAP is created in the request pool
> >   +          - just cache the FD, not the whole apr_file_t.  Build the
apr_file_t
> >   +            and its apr_bucket_file in the request pool.
> >   +          - add an extra parameter to apr_bucket_file_create() which
is the
> >   +            pool that an MMAP (if any) for that file should be
created in
>
> We don't need to dup the cached file.  Just use apr_os_get_file and
> apr_os_put_file to move the file descriptor to the correct pool.  We don't
> add a new cleanup, so the file won't be closed, but we will then be using
> the correct pool when we create the MMAP.

Right, so that basically fits in with option #2.  Option #1 has raised
various concerns since it was first proposed, including concern over the
possible expensiveness of dup() on some OS'es.  I just thought I'd
document all of the reasonable suggestions for completeness-sake, though
at this point I personally prefer one of the latter two options.

--Cliff


--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA




Re: New to Apache. A question.

Posted by Cliff Woolley <cl...@yahoo.com>.
On Thu, 17 May 2001, imran badr wrote:

> I am new to this group. I have a question about Apache web server. Does it
> forks a new process to handle a new http/https connection or create a new
> thread??

That depends.  Apache 1.3 manages a set of forked worker processes to
handle requests.  This is also true for some of the MPM's in Apache 2.0
(see eg the "prefork" MPM).  The other MPM's in Apache 2.0 handle requests
with worker threads, though the number of processes used varies from one
MPM to another.

--Cliff

--------------------------------------------------------------
   Cliff Woolley
   cliffwoolley@yahoo.com
   Charlottesville, VA