What’s FastCGI?

Print anything with Printful



FastCGI is an open standard that improves upon CGI by minimizing process overhead and allowing for reuse of connections. It is compatible with distributed processing and can handle tasks like authentication. FastCGI is simple, works with any programming language, and is backward compatible with CGI.

FastCGI is an extension of Common Gateway Interface (CGI) which was developed by a now defunct company called Open Market. FastCGI is freely available as an open standard. Fixes some deficiencies in the CGI that limit performance.

Unlike CGI, FastCGI does not create a new process for every request, thus minimizing the overhead of creating and destroying the process 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 since these are proprietary, there is an additional learning curve and limitations in the languages ​​supported. considered. Another shortcoming of CGI is the fact that some cases for reuse cannot be obtained, such as database connections or caching techniques. Request handling can be up to 30 times faster using FastCGI than conventional CGI.

With FastCGI, multiple requests can be handled on a single connection, 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 may be closed at this point, the web server and process persist. This offers many advantages. For example, it means that the server and the application process can be shut down or restarted separately.

FastCGI was originally developed by Open Market and implemented in their web server offering. However, the interface can be implemented on any server and was soon implemented on a number of other web servers in the industry. FastCGI is highly compatible with distributed processing, so a FastCGI application can run on a separate server to the web server. This offers all the benefits of increasing system availability, improving scalability and increasing system security because the components are isolated. Using remote FastCGI, there is less administration because the internal network can handle the execution of applications.

Just as a CGI application can generate a response from a Hypertext Transfer Protocol (HTTP) request, FastCGI can do this too. It also handles tasks like verifying authentication and converting data types. These tasks are managed using roles, which can be freely added and extended.
FastCGI is simple to understand and works with almost any programming language. Processes are isolated, so servers cannot crash due to application-specific problems. Any application built with the FastCGI framework is backward with older servers running CGI. In addition, the application library is designed to make migrating CGI applications easy.




Protect your devices with Threat Protection by NordVPN


Skip to content