Category: 

What is a FastCGI?

Article Details
  • Written By: J. Boland
  • Edited By: A. Joseph
  • Last Modified Date: 16 September 2016
  • Copyright Protected:
    2003-2016
    Conjecture Corporation
  • Print this Article
Free Widgets for your Site/Blog
The atmosphere of Jupiter's moon Io collapses every time it is eclipsed by the planet.   more...

September 29 ,  2008 :  The Dow Jones Industrial Average experienced its largest one-day drop in history.  more...

FastCGI is an extension of Common Gateway Interface (CGI) that was developed by a now-defunct company called Open Market. FastCGI is freely available as an open standard. It addresses certain shortcomings in CGI that limit performance.

Unlike CGI, FastCGI does not create a new process for each request, thus minimizing the overhead of process creation and destruction each time a request is received. This overhead can be circumvented by using Application Program Interfaces (APIs) such as Netscape Server Application Programming Interface (NSAPI) or Internet Server Application Programming Interface (ISAPI), but because these are proprietary, there are an additional learning curve and limitations in supported languages to be considered. Another shortcoming of CGI is the fact that certain cases for reuse can not be obtained, such as connections to databases or caching techniques. Request handling can be as much as 30 times faster using FastCGI over conventional CGI.

With FastCGI, multiple requests can be handled over a single connection, which is known as multiplexing. Alternatively, multiple connections can be used. Requests are transmitted using File Transfer Protocol (FTP) or sockets. The same connection is then used to return the response.

Although the connection might be closed at this point, the web server and the process still persist. This offers many advantages. For example, it means that the server and application process can be shut down or restarted separately.

Ad

FastCGI was originally developed by Open Market and implemented in its web server offering. The interface can be implemented on any server, however, and it was soon in place on a number of other industry web servers. FastCGI is highly compatible with distributed computing, so a FastCGI application can be running on a separate server to the web serve. This offers all of the advantages of enhancing the availability of systems, of improving scalability and of increasing system security because the components are isolated. By using remote FastCGI, there is less administration because the internal network can handle the running of applications.

Just as a CGI application can generate a response from a Hypertext Transfer Protocol (HTTP) request, so too can FastCGI. It also handles tasks such as verifying authentication and converting data types. These tasks are handled using roles, which can be added and extended freely.

FastCGI is simple to understand and will run with almost any programming language. Processes are isolated, so servers can not be crashed by application-specific issues. Any application built with the FastCGI framework is backward with old servers running CGI. Furthermore, the application library is designed to make the migration of CGI applications simple.

Ad

You might also Like

Recommended

Discuss this Article

FrischInBigD
Post 1

We need to switch from using Apache handler to FastCGI in our Joomla projects. This, mainly due to RocketTheme's recently introduced LESS CSS inclusions in their templates and components. We need some insights how to make that switch on our servers for each Joomla instance we create. We use a VMWare vSphere environment with a Windows Server.

Our Joomla instances are created using Jumpbox OVF files and these are automatically configured to use the Apache2 handler when the VM is created. How do we switch from the default Apache handler to FastCGI?

Thanks in advance!

Post your comments

exception 'Exception' with message 'error writing captcha: Duplicate entry '2147483647' for key 'PRIMARY'' in /ssd/www/wisegeek/public_html/_core/classes/public/Captcha.php:44
Stack trace:
#0 /ssd/www/wisegeek/public_html/_core/controls/public/ControlDiscussionPostBox.php(324): Captcha->createCaptcha()
#1 /ssd/www/wisegeek/public_html/framework/classes/Control.php(104): ControlDiscussionPostBox->preRender(false)
#2 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): Control->render()
#3 /ssd/www/wisegeek/public_html/tpl/default-nocustom-lu/pages/public/article/article.htm(526): Control->__toString()
#4 /ssd/www/wisegeek/public_html/framework/classes/Control.php(300): require('/ssd/www/wisege...')
#5 /ssd/www/wisegeek/public_html/framework/classes/Control.php(309): Control->requireTpl('pages/public/ar...', Object(PageArticleCom), true)
#6 /ssd/www/wisegeek/public_html/framework/classes/Control.php(131): Control->renderTpl('pages/public/ar...', Object(PageArticleCom))
#7 /ssd/www/wisegeek/public_html/framework/classes/FormDataControl.php(87): Control->renderTemplate()
#8 /ssd/www/wisegeek/public_html/framework/classes/Control.php(109): FormDataControl->renderTemplate()
#9 /ssd/www/wisegeek/public_html/framework/classes/ScriptPage.php(50): Control->render(false)
#10 /ssd/www/wisegeek/public_html/framework/classes/Control.php(149): ScriptPage->render()
#11 /ssd/www/wisegeek/public_html/framework/classes/Page.php(97): Control->__toString()
#12 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(443): Page->processRequest()
#13 /ssd/www/wisegeek/public_html/_core/classes/public/PublicFrontController.php(7): PublicFrontController->renderPage()
#14 /ssd/www/wisegeek/public_html/index.php(11): PublicFrontController::run()
#15 {main}