httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: [users@httpd] Question on need to restart Apache after adding/modifying module
Date Tue, 18 Sep 2007 09:39:38 GMT
Pravin wrote:
> 
> If this is the way Apache implements its plug-in architecture then
> why do we need to restart Apache when we add new module
> or update existing module ?

Three reasons;

  * fork() lets us create, say, 25 or 500 children, each identical, each
    with a copy-on-write pointer to the very same configuration and binary
    code pages.  Touch the third rail (modify that config in each child)
    and the memory consumed 1x now balloons to 25x, or 500x.

  * it's not terribly safe to modify the configuration structures created
    by httpd, they really are applied in a serial manner, not as some state
    machine the config state.  Most platforms couldn't unlink a module and
    replace it with the same (new build) of a module even if you tried in
    a running process (why do you suppose you have to reboot after a kernel
    patch anyways?)

  * Adding the sorts of features you suggest would substantially bloat
    httpd; there's a reason why you must have a GB to run a windows box
    anymore as a workstation :)  httpd's optimization is one core mission,
    the fastest possible service of individual requests.  Not startup,
    not teardown and not reconfiguration.

> Can I get pointers to some documentation or code which deals with how
> exactly these new DSO's are loaded and how these newly added
> modules come to life ? and why there is need for restarting Apache
> when we add or modify any module ?

Use the Source, Luke.  server/*.c and modules/mappers/mod_so.c should
be interesting to you.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message