<?xml version="1.0" encoding="utf-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: FastCGI, SCGI, and Apache: Background and Future</title>
	<atom:link href="http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/feed/" rel="self" type="application/rss+xml" />
	<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, 12 Feb 2012 02:03:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.2</generator>
		<item>
		<title>By: B V Raghav</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-324918</link>
		<dc:creator>B V Raghav</dc:creator>
		<pubDate>Sat, 05 Nov 2011 09:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#comment-324918</guid>
		<description>I started developing for web since 2009. Almost three years into it, and of course, what you had said turned out to be true.

The development visibly is moving towards a more 'organized' coding, and has followed a global shift towards FCGI.

Even my PC server runs php on FCGI!!

The only feeling that PHP and other cgi-based development is easier because, to develop Java, I require a NetBeans IDE, whereas, I can fare well enough using a Vim editor itself to develop cgi!!</description>
		<content:encoded><![CDATA[<p>I started developing for web since 2009. Almost three years into it, and of course, what you had said turned out to be true.</p>
<p>The development visibly is moving towards a more &#8216;organized&#8217; coding, and has followed a global shift towards FCGI.</p>
<p>Even my PC server runs php on FCGI!!</p>
<p>The only feeling that PHP and other cgi-based development is easier because, to develop Java, I require a NetBeans IDE, whereas, I can fare well enough using a Vim editor itself to develop cgi!!</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-324747</link>
		<dc:creator>TruePath</dc:creator>
		<pubDate>Fri, 12 Dec 2008 15:44:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#comment-324747</guid>
		<description>Pasarela:

Insisting that an integrated app server isn't the way forward because current app servers have too many security concerns is like insisting back in the early days of computing that multi-user systems would never work because their were too many security problems.

Language security mechanisms (making sure multiple pieces of code can be isolated in predictable ways) is a very important area for other reasons and one only needs to have a couple trustworthy language engines for this to work.  It won't happen overnight but it's likely no more code than we already trust in the kernel anyway.

Still I suspect this means we will eventually integrate some parts of VMs into the kernel and if I'd been thinking when I made this comment in my last post it means we won't have need for app-servers as such since the kernel will handle this for us.</description>
		<content:encoded><![CDATA[<p>Pasarela:</p>
<p>Insisting that an integrated app server isn&#8217;t the way forward because current app servers have too many security concerns is like insisting back in the early days of computing that multi-user systems would never work because their were too many security problems.</p>
<p>Language security mechanisms (making sure multiple pieces of code can be isolated in predictable ways) is a very important area for other reasons and one only needs to have a couple trustworthy language engines for this to work.  It won&#8217;t happen overnight but it&#8217;s likely no more code than we already trust in the kernel anyway.</p>
<p>Still I suspect this means we will eventually integrate some parts of VMs into the kernel and if I&#8217;d been thinking when I made this comment in my last post it means we won&#8217;t have need for app-servers as such since the kernel will handle this for us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Mason</title>
		<link>http://www.vmunix.com/mark/blog/archives/2006/01/02/fastcgi-scgi-and-apache-background-and-future/#comment-324675</link>
		<dc:creator>Aaron Mason</dc:creator>
		<pubDate>Fri, 24 Oct 2008 08:03:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#comment-324675</guid>
		<description>Hey,

The appserver approach isn't completely off the cards IMHO, it can still have a place for people who need highly specialised approaches that don't rely (heavily) on an existing technology.  

On the plus side, you can code your application your way without relying on developers of the technology you use to fix security bugs or having to learn the code and find the hole yourself.

On the downside, you're basically writing your own HTTP server so it is indeed quite complex (unless you use a language with a HTTP server module or library).  Also, if you have a problem, you have to take the whole thing down to fix it.  In the worst case scenario, if a major problem arises, it will affect the entire operation (unless you've got some threading going)

It has best application in things like web-based MMOs, ticket-based helpdesk solutions, some mission critical systems and other heavily-used applications that I can't think of at the moment.

No technology is suited to everything but every technology has purposes that it works best with.</description>
		<content:encoded><![CDATA[<p>Hey,</p>
<p>The appserver approach isn&#8217;t completely off the cards IMHO, it can still have a place for people who need highly specialised approaches that don&#8217;t rely (heavily) on an existing technology.  </p>
<p>On the plus side, you can code your application your way without relying on developers of the technology you use to fix security bugs or having to learn the code and find the hole yourself.</p>
<p>On the downside, you&#8217;re basically writing your own HTTP server so it is indeed quite complex (unless you use a language with a HTTP server module or library).  Also, if you have a problem, you have to take the whole thing down to fix it.  In the worst case scenario, if a major problem arises, it will affect the entire operation (unless you&#8217;ve got some threading going)</p>
<p>It has best application in things like web-based MMOs, ticket-based helpdesk solutions, some mission critical systems and other heavily-used applications that I can&#8217;t think of at the moment.</p>
<p>No technology is suited to everything but every technology has purposes that it works best with.</p>
]]></content:encoded>
	</item>
	<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>
		<dc:creator>Hablando de CGI: La Interfaz Común de Pasarela</dc:creator>
		<pubDate>Wed, 17 Oct 2007 17:02:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>[...] 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í). [...]</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>
		<dc:creator>Chris Seufert</dc:creator>
		<pubDate>Thu, 16 Aug 2007 06:17:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>TruePath</dc:creator>
		<pubDate>Sat, 30 Jun 2007 02:17:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>VMUNIX Blues » Blog Archive » FastCGI, SCGI, and Apache: Background and Future</dc:creator>
		<pubDate>Sun, 10 Jun 2007 17:21:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>[...] <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) [...]</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>
		<dc:creator>Roger Pack</dc:creator>
		<pubDate>Sun, 27 May 2007 05:56:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>Four Starters - &#187; Django adoption could be improved</dc:creator>
		<pubDate>Mon, 14 May 2007 23:00:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>[...] 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. [...]</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>
		<dc:creator>Matt Hamilton</dc:creator>
		<pubDate>Mon, 04 Dec 2006 14:00:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>mark</dc:creator>
		<pubDate>Tue, 07 Nov 2006 08:35:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>mancini at apache2triad.net</dc:creator>
		<pubDate>Sat, 04 Nov 2006 18:47:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>leroux.blog - ligHTTPD, FastCGI, Apache2, SCGI and Django deployment adventures</dc:creator>
		<pubDate>Mon, 07 Aug 2006 09:01:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>[...] <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> [...]</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>
		<dc:creator>Sickboy</dc:creator>
		<pubDate>Sun, 30 Jul 2006 10:58:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>Darryl</dc:creator>
		<pubDate>Fri, 23 Jun 2006 13:34:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>Alexey Zakhlestin&#8217;s blog &#187; FastCGI in PHP. The way it could be</dc:creator>
		<pubDate>Sat, 10 Jun 2006 19:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>[...] 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). [...]</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>
		<dc:creator>Mongrel for Rails Deployment at VMUNIX Blues</dc:creator>
		<pubDate>Thu, 18 May 2006 05:44:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>[...] 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. [...]</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>
		<dc:creator>ms</dc:creator>
		<pubDate>Tue, 16 May 2006 19:16:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>Jens Alfke</dc:creator>
		<pubDate>Thu, 27 Apr 2006 17:20:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
		<dc:creator>Paul Moore</dc:creator>
		<pubDate>Thu, 27 Apr 2006 11:02:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.vmunix.com/mark/blog/?p=391#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>
</channel>
</rss>

