The way i do this is having a lightweight apache proxy on port 80. My mod perl application listens on a different port and receives requests from the proxy. When i need to roll out new code, i start up a 2nd mod perl application on a 3rd port, update the rules for the proxy to go to the new code and reload the rules. Once everything is running on the new mod perl, i shut down the original mod perl application. There is about 0.5 seconds of lag while the proxy reloads the rules. Rolling out a new release in the fashion is a simple process that can be coded into a very simple shell script and executed with a single command.

There are also other reasons to have a proxy -> mod perl set up which i wont go into right now.

--brian

On Dec 17, 2003, at 5:08 PM, justin wrote:


One registry module checks for a new file before a request starts.
Another Registry class does no checking at all. Apache::Reload checks a
file on disk before the request, or ALL module timestamps. None of these
solutions are satisfactory. If code is rolled out, 10+ modperl processes
all reloading it at the same time will halt forward motion for 30
seconds or more (depends on code size, init time, and so on).


Is it possible to design something that checks in the EXIT phase, and
not every request, just randomly, say, every N times, so all servers
don't freeze up .. if they find a named 're-cycle' file is newer than
their own life-span, then they child_exit ? Ideally, they eval or syntax
check the new module(s), before deciding to child_exit.


If they find they do not eval without error, they erase the re-cycle
command file and try not to exit until an admin realizes their mistake
;)

would such a module be a logical plug-in replacement for the Registry
handler, a sub-class, or something else? I'd like to write it, but am
interested to know if I'm barking up the wrong tree.

thanks -Justin


-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html


--
Reporting bugs: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html



Reply via email to