<?xml version="1.0" encoding="utf-8"?><!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: FastCGI, SCGI, and Apache: Background and Future</title>
	<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/</link>
	<description>by Mark Mayo</description>
	<pubDate>Sun, 27 Jul 2008 04:16:39 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>

	<item>
		<title>by: Hablando de CGI: La Interfaz ComÃºn de Pasarela</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-122197</link>
		<pubDate>Wed, 17 Oct 2007 17:02:47 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-122197</guid>
					<description>[...] Ya terminando, existen otras versiones por asÃ­ llamarlas de CGI. Una de ellas es FastCGI, dÃ³nde se busca darle mayor velocidad a la ejecuciÃ³n de scripts creando un Ãºnico proceso para mÃºltiples peticiones y no uno por cada una como lo hace CGI. Otra, es SCGI, de la que no se mucho asique prefiero sÃ³lo nombrarla (si se quiere mÃ¡s informaciÃ³n acerca de Ã©sto, recomiendo leer aquÃ­). [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Ya terminando, existen otras versiones por asÃ­ llamarlas de CGI. Una de ellas es FastCGI, dÃ³nde se busca darle mayor velocidad a la ejecuciÃ³n de scripts creando un Ãºnico proceso para mÃºltiples peticiones y no uno por cada una como lo hace CGI. Otra, es SCGI, de la que no se mucho asique prefiero sÃ³lo nombrarla (si se quiere mÃ¡s informaciÃ³n acerca de Ã©sto, recomiendo leer aquÃ­). [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Chris Seufert</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-102607</link>
		<pubDate>Thu, 16 Aug 2007 06:17:28 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-102607</guid>
					<description>I'm admin'ing a vps hosting around 80 sites, all are chroot'ed from each other using fastcgi &#38; a modified sbox wrapper script. They are all running a fairly complex php based, content management system/shopping car. None of the sites do high volume, however, the vps with 512mb of ram, has never hit 500mb of ram usage...

So what im saying is why bother having an app server for all 80 sites which would likely use a lot more than 500mb of ram, even at just 8mb per process it would be troublesome, i can let fastcgi deal with spawning and killing php processes off as the load requires. (btw, the vps runs email and a few other things too, with in 500mb).

And the greatest part, of using fast-cgi + a chroot'd wrapper, is that i have the same setup for perl, scripts, so that they stay within the same jail, along with chroot'd ftp and chroot'd ssh access. And down the track i can add ruby/python support without having to change much at all.

So to me, fastcgi or an equivalent technology is fantastic for low volume, sporadically accessed sites.</description>
		<content:encoded><![CDATA[<p>I&#8217;m admin&#8217;ing a vps hosting around 80 sites, all are chroot&#8217;ed from each other using fastcgi &amp; a modified sbox wrapper script. They are all running a fairly complex php based, content management system/shopping car. None of the sites do high volume, however, the vps with 512mb of ram, has never hit 500mb of ram usage&#8230;</p>
<p>So what im saying is why bother having an app server for all 80 sites which would likely use a lot more than 500mb of ram, even at just 8mb per process it would be troublesome, i can let fastcgi deal with spawning and killing php processes off as the load requires. (btw, the vps runs email and a few other things too, with in 500mb).</p>
<p>And the greatest part, of using fast-cgi + a chroot&#8217;d wrapper, is that i have the same setup for perl, scripts, so that they stay within the same jail, along with chroot&#8217;d ftp and chroot&#8217;d ssh access. And down the track i can add ruby/python support without having to change much at all.</p>
<p>So to me, fastcgi or an equivalent technology is fantastic for low volume, sporadically accessed sites.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: TruePath</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-92381</link>
		<pubDate>Sat, 30 Jun 2007 02:17:35 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-92381</guid>
					<description>So it seems to me the big problem with pulling everything out of the web server is integration.  If all you want your web server to do is to find the file on the disk directly referred to by the URL pick the correct language that application is written in and pass it off to the appropriate server no problem.

That's fine so long as everyone still programs in just one web language.  However if things start passing off requests between languages it seems like the overhead of an http server for each language type will get oppressive.  Moreover, as an earlier commenter pointed out fastcgi and similar protocols can be updated to deal with specific problems they face unlike http.  In particular I suspect we will eventually want to add extensions to deal with things like coordinating URL rewriting or giving other information to the server.

The model I see is a little different.  The complex modules (dynamic languages etc..) will be stripped out of web server modules and each *language* will run it's own server which will coordinate with the web server using a more powerful protocol that replaces fastcgi which lets all communication flow over some fixed number of communication mechanisms (maybe even shared memory).  

Basically processes are a fairly heavyweight object and I see performance considerations pushing against their indiscriminate use.  Since dynamic languages are pursuing sandboxing type facilities for other reasons (managed code etc..) and OS user level permissions are a bad fit for cgi permissions letting one process run all the ruby or python scripts won't duplicate much effort.  Coding separation and maintainability issues will drive the various languages out of the web server so the web server, e.g. so they can use different threading models.  However, a desire to control how the request is processed and desire for lightweight integration of other scripts will keep us from fully separate web servers.  

In fact in the long run I see dynamic language support being moved directly into the OS where things like GC which benefit hugely from hardware features like write barriers can be optimized.</description>
		<content:encoded><![CDATA[<p>So it seems to me the big problem with pulling everything out of the web server is integration.  If all you want your web server to do is to find the file on the disk directly referred to by the URL pick the correct language that application is written in and pass it off to the appropriate server no problem.</p>
<p>That&#8217;s fine so long as everyone still programs in just one web language.  However if things start passing off requests between languages it seems like the overhead of an http server for each language type will get oppressive.  Moreover, as an earlier commenter pointed out fastcgi and similar protocols can be updated to deal with specific problems they face unlike http.  In particular I suspect we will eventually want to add extensions to deal with things like coordinating URL rewriting or giving other information to the server.</p>
<p>The model I see is a little different.  The complex modules (dynamic languages etc..) will be stripped out of web server modules and each *language* will run it&#8217;s own server which will coordinate with the web server using a more powerful protocol that replaces fastcgi which lets all communication flow over some fixed number of communication mechanisms (maybe even shared memory).  </p>
<p>Basically processes are a fairly heavyweight object and I see performance considerations pushing against their indiscriminate use.  Since dynamic languages are pursuing sandboxing type facilities for other reasons (managed code etc..) and OS user level permissions are a bad fit for cgi permissions letting one process run all the ruby or python scripts won&#8217;t duplicate much effort.  Coding separation and maintainability issues will drive the various languages out of the web server so the web server, e.g. so they can use different threading models.  However, a desire to control how the request is processed and desire for lightweight integration of other scripts will keep us from fully separate web servers.  </p>
<p>In fact in the long run I see dynamic language support being moved directly into the OS where things like GC which benefit hugely from hardware features like write barriers can be optimized.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: VMUNIX Blues Â» Blog Archive Â» FastCGI, SCGI, and Apache: Background and Future</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-88698</link>
		<pubDate>Sun, 10 Jun 2007 17:21:08 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-88698</guid>
					<description>[...] http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future Tags:&#160;fastcgi, apache, scgi, server, web, http, cgi(del.icio.us history) [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] <a href='http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future' rel='nofollow'>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future</a> Tags:&nbsp;fastcgi, apache, scgi, server, web, http, cgi(del.icio.us history) [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Roger Pack</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-82218</link>
		<pubDate>Sun, 27 May 2007 05:56:57 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-82218</guid>
					<description>There is scgi for windows, BTW :)</description>
		<content:encoded><![CDATA[<p>There is scgi for windows, BTW <img src='http://www.vmunix.com/mark/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Four Starters - &#187; Django adoption could be improved</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-80401</link>
		<pubDate>Mon, 14 May 2007 23:00:41 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-80401</guid>
					<description>[...] This is a given but installing Apache modules for every possible language by default is not a viable option forward. This article discusses some possible alternatives. I actually like the suggestion of using full blown HTTP servers in each application. I ran a Zope behind Apache with virtual host monster for years. Once you get it working it is really really solid or this was the part of my Zope installation which gave me the least amount of headaches. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] This is a given but installing Apache modules for every possible language by default is not a viable option forward. This article discusses some possible alternatives. I actually like the suggestion of using full blown HTTP servers in each application. I ran a Zope behind Apache with virtual host monster for years. Once you get it working it is really really solid or this was the part of my Zope installation which gave me the least amount of headaches. [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Matt Hamilton</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-44772</link>
		<pubDate>Mon, 04 Dec 2006 14:00:01 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-44772</guid>
					<description>&lt;blockquote cite="Ahmed"&gt;
I was thinking about non-forking servers, and the fact that they might not benifit from the next wave of dual core PCâ€™s, but now that the application is running in a seperate proccess and not embedded in the server process, I think that this is perfect now.
&lt;/blockquote&gt;

This is exactly the situation with Zope and Java apps.  Neither python nor java's VMs can really deal with multiple processors all that well (due in python's part to the Global Interpreter Lock). So the standard approach is to run multiple processes and then front them with apache/squid/whatever and load balacnce across the processes.  This scales very nicely to mutiple cores/processors/servers.

-Matt</description>
		<content:encoded><![CDATA[<blockquote cite="Ahmed"><p>
I was thinking about non-forking servers, and the fact that they might not benifit from the next wave of dual core PCâ€™s, but now that the application is running in a seperate proccess and not embedded in the server process, I think that this is perfect now.
</p></blockquote>
<p>This is exactly the situation with Zope and Java apps.  Neither python nor java&#8217;s VMs can really deal with multiple processors all that well (due in python&#8217;s part to the Global Interpreter Lock). So the standard approach is to run multiple processes and then front them with apache/squid/whatever and load balacnce across the processes.  This scales very nicely to mutiple cores/processors/servers.</p>
<p>-Matt
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: mark</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-42246</link>
		<pubDate>Tue, 07 Nov 2006 08:35:34 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-42246</guid>
					<description>I'm not sure what point you're trying to make mancini; you're all over the place. 

First, aside from PHP DSO modules have most definitely &lt;em&gt;not&lt;/em&gt; prevailed over app servers. Really.

Second, I agree that one of PHP's great strengths is its simplicity. I would argue that a related, yet slightly different, reason for it's popularity is that the initial "bar" to getting started is so incredibly low. Likewise for MySQL. Sysadmins aren't a patient bunch, and a quick zero-to-60 is a massively critical thing for driving adoption of server-based technologies. I'm convinced that's the major factor behind Rails success too, BTW (combined with good marketing). You can get started and get pages generated really, really easily with low level-of-effort compared to the frameworks / app servers it mocks.  :) 

I'm not sure how to read your comment about thousands of files. Assuming you've got Python or Java running bringing up their app servers is actually really trivial. Much easier than Rails today, for example. I will grant you that building apps for Zope or Tomcat (say) requires a much bigger  initial investment of time, but comparing Zope or Resin or Rails or whatever to PHP is nonsensical. Framework vs. language.

As I mentioned in a &lt;a href="http://www.vmunix.com/mark/blog/archives/2006/05/17/mongrel-for-rails-deployment/" rel="nofollow"&gt;follow-up post&lt;/a&gt; it looks like I was wrong and Rails will almost certainly go the HTTP app server route, and not CGI/FastCGI.</description>
		<content:encoded><![CDATA[<p>I&#8217;m not sure what point you&#8217;re trying to make mancini; you&#8217;re all over the place. </p>
<p>First, aside from PHP DSO modules have most definitely <em>not</em> prevailed over app servers. Really.</p>
<p>Second, I agree that one of PHP&#8217;s great strengths is its simplicity. I would argue that a related, yet slightly different, reason for it&#8217;s popularity is that the initial &#8220;bar&#8221; to getting started is so incredibly low. Likewise for MySQL. Sysadmins aren&#8217;t a patient bunch, and a quick zero-to-60 is a massively critical thing for driving adoption of server-based technologies. I&#8217;m convinced that&#8217;s the major factor behind Rails success too, BTW (combined with good marketing). You can get started and get pages generated really, really easily with low level-of-effort compared to the frameworks / app servers it mocks.  <img src='http://www.vmunix.com/mark/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
<p>I&#8217;m not sure how to read your comment about thousands of files. Assuming you&#8217;ve got Python or Java running bringing up their app servers is actually really trivial. Much easier than Rails today, for example. I will grant you that building apps for Zope or Tomcat (say) requires a much bigger  initial investment of time, but comparing Zope or Resin or Rails or whatever to PHP is nonsensical. Framework vs. language.</p>
<p>As I mentioned in a <a href="http://www.vmunix.com/mark/blog/archives/2006/05/17/mongrel-for-rails-deployment/" rel="nofollow">follow-up post</a> it looks like I was wrong and Rails will almost certainly go the HTTP app server route, and not CGI/FastCGI.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: mancini at apache2triad.net</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-41964</link>
		<pubDate>Sat, 04 Nov 2006 18:47:58 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-41964</guid>
					<description>Just like you predict CGI to prevail over DSO modules on account of simplicity  , DSO  modules have prevailed over app servers.

You mention the extraordinary adoption rate for php  , well from it's documentation  , usage  , implementation one thing is constant  , simplity (think mysql  ,same thing stems from it too ,  connect the dots)

Realise that php either by DSO or CGI only needed the binary  , the libraries  , extensions and config file  , which were only a handfull of files initially  , and still are tens of files  , not hundreds  , not thousands like zope or java.

Ruby for one is allready monlithic in respects to usage  , they should be crazy to go that way about deployment too.</description>
		<content:encoded><![CDATA[<p>Just like you predict CGI to prevail over DSO modules on account of simplicity  , DSO  modules have prevailed over app servers.</p>
<p>You mention the extraordinary adoption rate for php  , well from it&#8217;s documentation  , usage  , implementation one thing is constant  , simplity (think mysql  ,same thing stems from it too ,  connect the dots)</p>
<p>Realise that php either by DSO or CGI only needed the binary  , the libraries  , extensions and config file  , which were only a handfull of files initially  , and still are tens of files  , not hundreds  , not thousands like zope or java.</p>
<p>Ruby for one is allready monlithic in respects to usage  , they should be crazy to go that way about deployment too.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: leroux.blog - ligHTTPD, FastCGI, Apache2, SCGI and Django deployment adventures</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-34656</link>
		<pubDate>Mon, 07 Aug 2006 09:01:52 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-34656</guid>
					<description>[...] http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] <a href='http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future' rel='nofollow'>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future</a> [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Sickboy</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-33911</link>
		<pubDate>Sun, 30 Jul 2006 10:58:36 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-33911</guid>
					<description>Darryl, I think you forgot some problems with mpm_perchild.

One being the fact that it has been in the "will be stable one day" state for what, the last 4 years? Will it ever become stable?

The bigger problem is that the processes for each security context (each UID basically) are not separate processes but threads in a single process. Which means that interpreters for the above mentioned frameworks (or any dynamic content generating "backend") should be thread safe.
Which condition is not met by most of the most popular frameworks.
PHP interpreter has ZTS but I'm not sure if its considered stable nowadays, but even if it is, quite few of the PHP extensions are NOT thread safe and most of them will never be. That said, such thing as a "PHP interpreter with the common set of extensions" is not going to be thread safe anytime soon (or ever).
As for rails, I read in one of the recent RoR-anti-hype articles (they seem to grow on trees nowadays) that ruby (or RoR?) is definitely not thread safe.
So you could use mpm_perchild for running... maybe python? And nothing else.

Not to mention other deficiencies of mpm_perchild, like the lack of ability to chroot each security context.

Maybe these are the very reasons this mpm is not even stable yet?</description>
		<content:encoded><![CDATA[<p>Darryl, I think you forgot some problems with mpm_perchild.</p>
<p>One being the fact that it has been in the &#8220;will be stable one day&#8221; state for what, the last 4 years? Will it ever become stable?</p>
<p>The bigger problem is that the processes for each security context (each UID basically) are not separate processes but threads in a single process. Which means that interpreters for the above mentioned frameworks (or any dynamic content generating &#8220;backend&#8221;) should be thread safe.<br />
Which condition is not met by most of the most popular frameworks.<br />
PHP interpreter has ZTS but I&#8217;m not sure if its considered stable nowadays, but even if it is, quite few of the PHP extensions are NOT thread safe and most of them will never be. That said, such thing as a &#8220;PHP interpreter with the common set of extensions&#8221; is not going to be thread safe anytime soon (or ever).<br />
As for rails, I read in one of the recent RoR-anti-hype articles (they seem to grow on trees nowadays) that ruby (or RoR?) is definitely not thread safe.<br />
So you could use mpm_perchild for running&#8230; maybe python? And nothing else.</p>
<p>Not to mention other deficiencies of mpm_perchild, like the lack of ability to chroot each security context.</p>
<p>Maybe these are the very reasons this mpm is not even stable yet?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Darryl</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-31189</link>
		<pubDate>Fri, 23 Jun 2006 13:34:30 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-31189</guid>
					<description>The whole issue about FCGI via in-core modules (for me) is about security contexts.  It is currently not possible to partition resources via in-core modules in a useful enough way to protect one customers site from another and reclaim redundant resources in a timely manner.  The app servers have gone to great lengths to encapsulate and partition one application from another to provide some form of seperation, I use FCGI to achieve the same thing.

There is also a large apeal of in-code modules to in-house users, due to the simplicity and the desire to not have to learn anything about administrating a webserver to get one with a productive website.

There is also new work on Apache 2.2 with a mpm_perchild, which is a hybrid of processes and threads to allow the process space to have a security context and resource limit and within that requests are serviced in a by a threaded server (like mpm_worker).

Once that is stable and working well there well be even less need for FCGI, as you can use in-core modules but still get per virtualhost/userid process isolation.  It will then be a matter of time before the lifecycle of the apache mpm_perchild workers can be controlled as well as FCGI, so resources are reclaimed.

There is one big disadvange for moderatly busy websites using FCGI and any form of proxy that is all the data is being copied around and maintain two (or three) connection resources per request (not including ones to databases).  The mpm_prechild solution maybe able to stop all that.  The data has to go browser -&#62; http apache -&#62; fcgi and back again, this extra indirection is only worth while when your webhosting is setup with redundancy in mind otherwise it just reduces your overall request per second throughput for a single machine setup.  mpm_perchild is more likely to be the answer than FCGI/SCGI.</description>
		<content:encoded><![CDATA[<p>The whole issue about FCGI via in-core modules (for me) is about security contexts.  It is currently not possible to partition resources via in-core modules in a useful enough way to protect one customers site from another and reclaim redundant resources in a timely manner.  The app servers have gone to great lengths to encapsulate and partition one application from another to provide some form of seperation, I use FCGI to achieve the same thing.</p>
<p>There is also a large apeal of in-code modules to in-house users, due to the simplicity and the desire to not have to learn anything about administrating a webserver to get one with a productive website.</p>
<p>There is also new work on Apache 2.2 with a mpm_perchild, which is a hybrid of processes and threads to allow the process space to have a security context and resource limit and within that requests are serviced in a by a threaded server (like mpm_worker).</p>
<p>Once that is stable and working well there well be even less need for FCGI, as you can use in-core modules but still get per virtualhost/userid process isolation.  It will then be a matter of time before the lifecycle of the apache mpm_perchild workers can be controlled as well as FCGI, so resources are reclaimed.</p>
<p>There is one big disadvange for moderatly busy websites using FCGI and any form of proxy that is all the data is being copied around and maintain two (or three) connection resources per request (not including ones to databases).  The mpm_prechild solution maybe able to stop all that.  The data has to go browser -&gt; http apache -&gt; fcgi and back again, this extra indirection is only worth while when your webhosting is setup with redundancy in mind otherwise it just reduces your overall request per second throughput for a single machine setup.  mpm_perchild is more likely to be the answer than FCGI/SCGI.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Alexey Zakhlestin&#8217;s blog &#187; FastCGI in PHP. The way it could be</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-29739</link>
		<pubDate>Sat, 10 Jun 2006 19:33:00 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-29739</guid>
					<description>[...] Embedding application into web-server is really good speed-wise, as the process initialization happens only once, and all of the requests are served in preloaded environment. No separate processes are started for serving requests, everything stays inside. This is good, and this is bad, at the same time. Think &#8220;security&#8221;, think &#8220;scalability&#8221;. Running your application inside of web-server means, that at the base-level it will have all the rights, which web-server itself has, which means that at the virtual-hosting any user can have access to any other users file (which include passwords and any other sensitive information). At the same time, there is no easy way to scale application to several machines, if there is a need to do so. Scalability issue can be solved by proxy&#8217;ing, but that is not the most beautiful solution, imho. (Mark Mayo has the different opinion on this subject). [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Embedding application into web-server is really good speed-wise, as the process initialization happens only once, and all of the requests are served in preloaded environment. No separate processes are started for serving requests, everything stays inside. This is good, and this is bad, at the same time. Think &#8220;security&#8221;, think &#8220;scalability&#8221;. Running your application inside of web-server means, that at the base-level it will have all the rights, which web-server itself has, which means that at the virtual-hosting any user can have access to any other users file (which include passwords and any other sensitive information). At the same time, there is no easy way to scale application to several machines, if there is a need to do so. Scalability issue can be solved by proxy&#8217;ing, but that is not the most beautiful solution, imho. (Mark Mayo has the different opinion on this subject). [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Mongrel for Rails Deployment at VMUNIX Blues</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-12079</link>
		<pubDate>Thu, 18 May 2006 05:44:47 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-12079</guid>
					<description>[...] Sometimes, I love being wrong. Like, when I concluded at the end of my &#8220;FastCGI, SCGI, and Apache: Background and Future&#8221; post that I figured FastCGI or SCGI would continue to be the defacto deployment standard for Rails apps, even though I mostly prefered a HTTP approach. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Sometimes, I love being wrong. Like, when I concluded at the end of my &#8220;FastCGI, SCGI, and Apache: Background and Future&#8221; post that I figured FastCGI or SCGI would continue to be the defacto deployment standard for Rails apps, even though I mostly prefered a HTTP approach. [&#8230;]
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: ms</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11967</link>
		<pubDate>Tue, 16 May 2006 19:16:55 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11967</guid>
					<description>hi,
I got linked here, and I shudder when all my users get to start another static process on their own that I do proxy with apache/squid.

The zope users have memory limits, and the ruby folks have even lower limits.
I'm constantly wasting memory and cpu in idle loops of such sites, so I'm even thinking about a dirty hack signalling them STOP when the last connection dies, and CONT if the next one arrives ....

just my two cents ...b.t.w. good article</description>
		<content:encoded><![CDATA[<p>hi,<br />
I got linked here, and I shudder when all my users get to start another static process on their own that I do proxy with apache/squid.</p>
<p>The zope users have memory limits, and the ruby folks have even lower limits.<br />
I&#8217;m constantly wasting memory and cpu in idle loops of such sites, so I&#8217;m even thinking about a dirty hack signalling them STOP when the last connection dies, and CONT if the next one arrives &#8230;.</p>
<p>just my two cents &#8230;b.t.w. good article
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Jens Alfke</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11358</link>
		<pubDate>Thu, 27 Apr 2006 17:20:23 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11358</guid>
					<description>Excellent article! And I did read the whole thing.

You may be aware of this already, but in the brief time since you wrote your post, in the Ruby/Rails world, the new HTTP engine "Mongrel" has been getting a lot of excited attention. It does exactly what you describe â€” lets Ruby web-apps handle their own HTTP connections, so they can be used either standalone or proxied behind another web server. (This was also possible with WEBrick, but Mongrel is by all accounts many, many times faster.)

The big flaw I see with using HTTP as the interface to web-apps is that, as already mentioned, it isn't supported by most shared hosting environments. That's a pretty significant problem since so many people rely on shared hosting. Not the pros, of course, but the majority of amateurs and hackers, enough so that I think HTTP-proxying won't be seen as a mainstream solution, just a special item from the bag of tricks that you whip out for large-scale deployment.</description>
		<content:encoded><![CDATA[<p>Excellent article! And I did read the whole thing.</p>
<p>You may be aware of this already, but in the brief time since you wrote your post, in the Ruby/Rails world, the new HTTP engine &#8220;Mongrel&#8221; has been getting a lot of excited attention. It does exactly what you describe â€” lets Ruby web-apps handle their own HTTP connections, so they can be used either standalone or proxied behind another web server. (This was also possible with WEBrick, but Mongrel is by all accounts many, many times faster.)</p>
<p>The big flaw I see with using HTTP as the interface to web-apps is that, as already mentioned, it isn&#8217;t supported by most shared hosting environments. That&#8217;s a pretty significant problem since so many people rely on shared hosting. Not the pros, of course, but the majority of amateurs and hackers, enough so that I think HTTP-proxying won&#8217;t be seen as a mainstream solution, just a special item from the bag of tricks that you whip out for large-scale deployment.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Paul Moore</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11346</link>
		<pubDate>Thu, 27 Apr 2006 11:02:17 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11346</guid>
					<description>Hi,
I was pointed to this article via Ian Bicking's, and it's of particular interest to me. I run a couple of small internal web applications behind Apache at the moment, and I much prefer HTTP proxying. But there are problems.

First of all, the benefits for HTTP. My server is Windows and setting up persistent FastCGI processes is a pain - you need to wrap them in services, and this usually isn't included in packaged apps (although tools exist to do it). Standalone web servers are much more likely to be ready-packaged as services (or easier to modify for that purpose). Also, FastCGI is not part of the standard Apache2 binary for Windows, so it's a nuisance to get hold of.

SCGI is not an option for me, as it's Unix-only.

But the big downside to HTTP proxying is ensuring that all the info I need passes through the proxy. For example, I need SSPI authentication, which I have set up using mod_sspi on my Apache frontend. But getting the authentication data to the backend is a nightmare. In one case, I have 2 instances of Apache, both with authentication switched on (a fromtend 2.0 with mod_sspi and a backend 1.3 with mod_ntlm). In another case, I simply gave up and use mod_python.

Another issue can be picking apart URLs. If I want to "mount" my Wiki on http://myserver/wiki, I need to do URL mapping in the Wiki server (like VirtualHostMonster in zope, but for a custom app). I'm hoping WSGI in Python will help with this, but haven't got round to trying it yet.

So ultimately, I sort of agree with Ian. HTTP proxying is in many ways the ideal solution - but communication between the front end server and the backend can be a nightmare, if the backend app isn't built to expect to sit behind a proxy.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I was pointed to this article via Ian Bicking&#8217;s, and it&#8217;s of particular interest to me. I run a couple of small internal web applications behind Apache at the moment, and I much prefer HTTP proxying. But there are problems.</p>
<p>First of all, the benefits for HTTP. My server is Windows and setting up persistent FastCGI processes is a pain - you need to wrap them in services, and this usually isn&#8217;t included in packaged apps (although tools exist to do it). Standalone web servers are much more likely to be ready-packaged as services (or easier to modify for that purpose). Also, FastCGI is not part of the standard Apache2 binary for Windows, so it&#8217;s a nuisance to get hold of.</p>
<p>SCGI is not an option for me, as it&#8217;s Unix-only.</p>
<p>But the big downside to HTTP proxying is ensuring that all the info I need passes through the proxy. For example, I need SSPI authentication, which I have set up using mod_sspi on my Apache frontend. But getting the authentication data to the backend is a nightmare. In one case, I have 2 instances of Apache, both with authentication switched on (a fromtend 2.0 with mod_sspi and a backend 1.3 with mod_ntlm). In another case, I simply gave up and use mod_python.</p>
<p>Another issue can be picking apart URLs. If I want to &#8220;mount&#8221; my Wiki on <a href='http://myserver/wiki,' rel='nofollow'>http://myserver/wiki,</a> I need to do URL mapping in the Wiki server (like VirtualHostMonster in zope, but for a custom app). I&#8217;m hoping WSGI in Python will help with this, but haven&#8217;t got round to trying it yet.</p>
<p>So ultimately, I sort of agree with Ian. HTTP proxying is in many ways the ideal solution - but communication between the front end server and the backend can be a nightmare, if the backend app isn&#8217;t built to expect to sit behind a proxy.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Ian Bicking</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11335</link>
		<pubDate>Thu, 27 Apr 2006 00:54:49 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11335</guid>
					<description>Howdy.  Someone asked me about this article, and I ended up writing up a longish reply... http://blog.ianbicking.org/fastcgi-scgi-http.html

(to summarize, I think HTTP proxying is a subset of the capabilities of the *CGIs; only a tiny bit less powerful, but still in some important ways)</description>
		<content:encoded><![CDATA[<p>Howdy.  Someone asked me about this article, and I ended up writing up a longish reply&#8230; <a href='http://blog.ianbicking.org/fastcgi-scgi-http.html' rel='nofollow'>http://blog.ianbicking.org/fastcgi-scgi-http.html</a></p>
<p>(to summarize, I think HTTP proxying is a subset of the capabilities of the *CGIs; only a tiny bit less powerful, but still in some important ways)
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: consulting it</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11029</link>
		<pubDate>Fri, 21 Apr 2006 13:59:56 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-11029</guid>
					<description>Hmm,

i think that apache for me is o slow server i'm looking for better http serwer which will be faster and powerfull.
Anyway, good article and i will be back here soon.</description>
		<content:encoded><![CDATA[<p>Hmm,</p>
<p>i think that apache for me is o slow server i&#8217;m looking for better http serwer which will be faster and powerfull.<br />
Anyway, good article and i will be back here soon.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Enquanto isso, na repartição&#8230; &#187; Blog Archive &#187; Vortex Drops</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-10565</link>
		<pubDate>Tue, 21 Mar 2006 20:22:02 +0000</pubDate>
		<guid>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-10565</guid>
					<description>[...] FastCGI, SCGI, and Apache: Background and Future Aqui segue uma boa discussão sobre FastCGI, proxies, mod_{php,python,ruby} e ambientes de execução persistente para aplicações web. Leitura de suma importância para quem anda acompanhando as últimas do mundo python&#8230; (e ruby&#8230;). O cara que estreveu esse artigo tem um blog muito bacana que apontava para&#8230; [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] FastCGI, SCGI, and Apache: Background and Future Aqui segue uma boa discussão sobre FastCGI, proxies, mod_{php,python,ruby} e ambientes de execução persistente para aplicações web. Leitura de suma importância para quem anda acompanhando as últimas do mundo python&#8230; (e ruby&#8230;). O cara que estreveu esse artigo tem um blog muito bacana que apontava para&#8230; [&#8230;]
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
