IIS 5 & IIS 6
FastCGI - multi-threaded application
Last post May 16, 2013 11:16 AM by Adam Kozlowski
May 09, 2013 04:13 AM|Adam Kozlowski|LINK
According to FastCGI specification http://www.fastcgi.com/drupal/node/6?q=node/22 application can handle multiple requests over one single transport connection (simple speaking... per one process)
All data that flows over the transport connection is carried in FastCGI records. FastCGI records accomplish two things. First, records multiplex the transport connection between several independent FastCGI requests. This multiplexing supports applications that
are able to process concurrent requests using event-driven or multi-threaded programming techniques. Second, records provide several independent data streams in each direction within a single request.
Are FastCGI modules for IIS (http://www.iis.net/downloads/microsoft/fastcgi-for-iis) able to handle FastCGI application that way ?
I've checked several configuration on *nix environments and each of them can handle requests that way... (one application process can handle concurrent multiple requests so it's not necessary to spawn new process to handle concurrent request)
- Apache + mod_fastcgi
- Nginx (has native fastcgi support)
- lighttpd + spawn_fastcgi
Any help appreciated.
May 16, 2013 05:31 AM|Chen Yu - MSFT|LINK
FastCGI for IIS enables popular application frameworks that support the FastCGI protocol to be hosted on the IIS web server in a high-performance and reliable way. FastCGI addresses the performance issues inherent to CGI by providing a mechanism to reuse
a single process over and over again for many requests. It support many Requests.
May 16, 2013 11:16 AM|Adam Kozlowski|LINK
Thanks for FastCGI definition.
Next time, let everyone to go on Wiki page to find full encyclopaedic definition.
Going back to the question...
Does IIS FastCGI module implements things stated in fastCGI specification ?
According to spec...
“The protocol serves two purposes.
First, the protocol multiplexes a single transport connection between several independent FastCGI requests. This supports applications that are able to process concurrent requests using event-driven or multi-threaded programming techniques.
Second, within each request the protocol provides several independent data streams in each direction.”
Is it possible to handle concurrent requests without spawning new application processes by IIS FastCGI module (or just to decrease number of spawning processes) ?
There are two ways web server can play with FastCGI application to handle concurrent requests:
1) create new process with application (of course if can, see “MaxInstances”)
2) single application process can handle multiple requests (it's not necessary to spawn new process by web server). It can be done using multiple handle (preferred way) or by multiplexing requests.
Is it possible to go into second way using IIS as a web server ?