CGI & FastCGI

Ji Kim·2020년 8월 21일

Computer Architecture

목록 보기
2/3

What is CGI?

Common Gateway Interface (CGI) is a standard way for a Web server to pass a Web user's request to the application program thus enhancing the to exchange of the data between the user and the application.

Imagine a user filling out a form on a Web page. Once the data stored within the form is sent to the server on request, the data need to be processed by an application program

The application will receive the requested data and send it back to the user accordingly. This method of exchaning data between the user and the application program is part of the Hypertext Transfer Protocol(HTTP), more precisely known as the CGI.

Advantages & Disadvantages of CGI

Advantages

  1. CGI provides a consistent method to a user on exchaning the data with the application program thus guaranteeing the program to run in various operating systems (i.e - PC, Mac, Linux and etc.)
  2. By its consistency of the interface, CGI can be written in any languages. (i.e - Python, Java, PERL, C++)

Disadvantage

  1. CGI creates new processes for each request which makes the interface easy to implement but also limits efficiency and scalability possibly causing an overhead.

An Alternative - FastCGI

FastCGI is a language independent open extension of the CGI providing high performance compare to the CGI. FastCGI enables to do so by executing the time-consuming CGI script for only once.

CGI vs. FastCGI

  1. FastCGI is an upgraded variation of the previous CGI, allowing a server to handle more web-page requests at once.
  2. FastCGI implements persistent processes to manage series of requests. By handling multiples requests at the same time, FastCGI avoids the overhead of per-request process creation and termination
  3. Although the FastCGI is the new and improved version of CGI, since the FastCGI processes are always running more memory usage is inevitable.
profile
if this then that

5개의 댓글

comment-user-thumbnail
2023년 4월 5일

who need help improving their coding skills bubble slides, daily game solve cross

답글 달기
comment-user-thumbnail
2023년 6월 19일

I recently had the pleasure of trying out the Air Compressor, and let me tell you, it has completely transformed my DIY projects and overall efficiency. As someone who enjoys woodworking and various home improvement tasks, a reliable and powerful air compressor is an absolute must-have tool in my workshop. visit, click for more info, Use this website, click to read more, find more info.

답글 달기
comment-user-thumbnail
2026년 5월 12일

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article.Spring trash can cleaning

답글 달기
comment-user-thumbnail
2026년 5월 18일

We've just lately commenced a new web site, the details anyone present on this internet site features made it easier for us drastically. Cheers pertaining to your occasion & operate.

답글 달기
comment-user-thumbnail
2026년 5월 23일

Superbly written article, if only all bloggers offered the same content as you, the internet would be a far better place.. 강남달리는토끼

답글 달기