IIS 7 FastCGI Module

Posted: Oct 31, 2006  4 comments

Average Rating

Tags
IIS News

The IIS FastCGI preview is ready! I spent the last month developing the IIS 7 FastCGI module. Wade has adapted the module to work as an ISAPI on IIS 6 (and unofficially on IIS 5). Marchel and Mukhtar (and recently Cip) have been testing until late in the evenings for the last few weeks. Bill and Mike have been managing the project. It was really exciting going from nothing to something in 1 month. Normally we take product development at a slower pace.

Thank you to these excellent PHP developers: Dmitry, Wez, Andi and Stanislav. I'm guessing most of them are currently at the San Jose Zend/PHP Conference

I don't know what throughput numbers will be officially recorded, but unofficial ones I've tested (helloworld.php, Longhorn Server, pre-release PHP bits) are running 25x (twenty-five TIMES) faster than running PHP as a CGI. So this is a real win for people who cannot run PHP as an ISAPI. (Some PHP extensions are not thread safe and therefore couldn't be run safely as ISAPIs. I don't know which ones, just have nasty stories from Andreas in CSS)

Technology Preview 1 is be available on www.iis.net. So far I've only tested it with PHP and the libfcgi SDK sample echo.exe. I'd love us to try out some other technologies, so if you have any suggestions please comment on the FastCGI forums. If you find any FastCGI apps we're incompatible with, please bring it to our attention and we'll get them working!

Overview of the current design (which could change substantially before release):
  • Configuration applies at the worker process level
  • Each worker process can be configured to run many FastCGI process pools
  • Each process pool can be configured independently
  • Processes are spawned on demand up to the maximum (there is no MinServers setting)
  • If there are more requests than processes, requests are queued up to request limits
  • If a FastCGI process has been idle for more than 5 minutes we retire it
IIS 7 configuration settings (per process pool):
  • fullPath: path to application for this pool (e.g. d:\php\php-cgi.exe, NOTE: must match handlers section)
  • maxInstances: maximum number of processes to create in this pool
  • instanceTimeout: maximum duration a request can last
  • instanceMaxRequests: process will be retired after exceeding this number of requests
  • protocol: use named pipes or tcp. The tech preview currently only supports named pipes, but TCP should be simple to add.
  • queueLength: maximum number of requests to queue (when this is exceeded the module will start 500'ing)
  • flushNamedPipe: Flush the named pipe at the end of each request. This is to workaround, what seems to be a bug in libfcgi: if two FastCGI requests arrive in a single ReadFile call, libfcgi closes the pipe. (If anyone wants to tackle this problem, I'd be happy to provide a repro)
Links:

Comments

  1. Server: Microsoft-IIS/7.0\r\n
    October 31, 2006

    IIS hits another milestone yesterday with new collaboration with Zend - The PHP Company . This is hot

  2. ScottGu's Blog
    November 1, 2006

    I've blogged several times in the past about how cool IIS 7.0 is. Many of my posts have highlighted some

  3. scottgu
    November 3, 2006

    我过去写过几个博客帖子,都是写 IIS 7.0 是多么地酷的。我的很多帖子着重于 IIS7 给 ASP.NET 和 .NET 开发人员带来的新机遇,譬如集成的管道模型,统一的web.config 配置,集成的管理工具体验等。它真的将给开发人员开辟出巨大的机遇,以及提供给大家一个可以无限定制的web服务器。

  4. Installer Wordpress sur le pack MSDN Ikoula | BlogAtom
    June 6, 2008

    Pingback from  Installer Wordpress sur le pack MSDN Ikoula | BlogAtom

Page view counter