CGI & FastCGI

Ji Kim·2020년 8월 21일
0

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

2개의 댓글

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.

답글 달기