From: Sean Chittenden Date: 2002-04-08T11:55:58+09:00 Subject: Re: ModRUBY question > 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. Anyway, with the above diagram, you should be able to see that you can have your request served by possibly many apache processes, each apache process has its own interpreter. Under mod_ruby, one apache process = one Ruby interpreter. 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 -- Sean Chittenden