11.17.07
FastCGI for IIS released
Microsoft have announced the public release of FastCGI for IIS. This package is part of the collaborative work which has been going on between Microsoft and Zend to improve performance and stability of PHP on the Windows platform and aims to help PHP developers achieve improved performance on the Windows platform by using the new IIS FastCGI feature together with Zend’s on-going work to improve the PHP engine on Windows.
So what is this “FastCGI”?
CGI programs are executables launched by the web server for each request in order to process the request and generate dynamic responses that are sent back to the client. Because many of these frameworks do not support multi-threaded execution, CGI enables them to execute reliably on IIS by executing exactly one request per process. Unfortunately, it provides poor performance due to the high cost of starting and shutting down a process for each request.
FastCGI overcomes this performance penalty by re-using CGI processes to service subsequent requests, while continuing to ensure single request concurrency. there is a whitepaper available on the FastCGI site explaining exactly how this all works.
So why is this important?
Most applications built for IIS take advantage of the native, multi-threaded extensibility model of the server. Many popular applications, particularly those not written specifically for the IIS environment, are not multi-threaded, and instead take a multi-process approach to concurrency. While the PHP engine itself is multi-thread capable, many of the popular PHP extensions are not, requiring a single concurrent request guarantee to operate reliably, this forces the use of CGI and can result in poor performance. FastCGI helps these application frameworks to achieve improved performance on Windows over CGI, while allowing stable operation in production environments.
The FastCGI installer for Windows 2003 Server and IIS6 can be downloaded here at the IIS.net site. If you are running Vista of Windows Server 2008 with IIS7, you already have the capability of running FastCGI and there are instructions for enabling it also on the IIS.net site.
As a sometime PHP user this is something which I will be taking a keen interest in and I think it represents a strong step forward for IIS.
- J.


FastCGI for IIS released said,
November 17, 2007 at 10:17 am
[...] John wrote an interesting post today onHere’s a quick excerptMicrosoft have announced the public release of FastCGI for IIS. This package is part of the collaborative work which has been going on between Microsoft and Zend to improve performance and stability of PHP on the Windows platform and … [...]