From: Jim Freeze Date: 2002-04-08T12:06:57+09:00 Subject: Re: ModRUBY question On Sun, Apr 07, 2002 at 07:55:56PM -0700, Sean Chittenden wrote: > > I still can't figure out what you mean here: > > > In effect, there is more than one instance of the > > > interpreter per mod_ruby instance, but there is only one interpreter > > > per request. :~) > > > > > > A clarification would be appreciated. > > MM.... how about this (little ASCII art): > > > > /--------| 80/tcp |---\ > | | > | /---------------\ | The parent apache process is the only apache > | | Parent Apache | | process that listens on port 80 (or any port > | | Process | | that you tell apache to listen on). > | \---------------/ | > | | | > | /|\ | Apache passes the file descriptor of incoming > | //|\\ | requests to an already forked child. > | ///|\\\ | > | ////|\\\\ | > | /////|\\\\\ | > | /~~~~~~~~~~~~~~~~~\ | An unknown (configurable w/in certain bounds) > | ~ Multipl child ~ | number of children serve requests and send > | ~ processes ~ | data to clients. > | \~~~~~~~~~~~~~~~~~/ | > | | > \---------------------/ > > So when you request a page from a webserver, you can get any one of > potentially hundreds of webservers (5-1024) on my boxen, though > typically it's capped at 150. Yes, I understand all of the above. Very basic stuff. > Anyway, with the above diagram, you > should be able to see that you can have your request served by > possibly many apache processes, Wouldn't it be more accurate to say that your request may be served by 'one' of possibly many apache processes? That is, a request is served by a single process, not by one or more processes. > each apache process has its own interpreter. What is this ------------------------^ > Under mod_ruby, one apache process = one Ruby interpreter. Ok, so each apache process will have an associated ruby process (not mod_ruby)? > > If you're shaky up to this point, don't read on. :~) The reason I > would say that there is only one mod_ruby instance is because mod_ruby > behaves the same on all Apache processes in the diagram above. -sc (I'm not trying to be difficult here, but) so mod_ruby is an application with a single process running on a server and is used by all of the apache processes? Thanks and Cheers -- Jim Freeze If only I had something clever to say for my comment... ~