CGI, FCGI, scgi, WSGI

Source: Internet
Author: User
Tags web hosting

IKI Links:

Cgi-http://en.wikipedia.org/wiki/common_gateway_interface

fcgi-http://en.wikipedia.org/wiki/fcgi

scgi-http://en.wikipedia.org/wiki/scgi

Wsgi-http://en.wikipedia.org/wiki/wsgi

Other reference:

Http://helpful.knobs-dials.com/index.php/CGI%2C_FastCGI%2C_SCGI%2C_WSGI%2C_servlets_and_such#FastCGI_and_SCGI

CGI = Common Gateway Interface

As the name implies, it is an interface specification. This specification details the server Agent running in the Web server, how to obtain and return the parameter names in the server environment context and the HTTP protocol during Web page generation, as you know: Request_method,query_string,content_ Type, and so on. Most Web server programs accept and process HTTP requests as script proxies, returning HTTP pages or responses. These scripts are known as PHP, ASP, JSP, and so on.

FCGI = Fast CGI

It is actually a variant of CGI in a concrete implementation. It is designed to achieve the ultimate goal of improving Web service performance by reducing the communication overhead of the CGI agent and web hosting service programs. This shows that fcgi in the specification and CGI is not different, but the specific implementation of the way to improve: CGI, for each HTTP request, the web Host service program to establish a new process to invoke the server script, the corresponding request; fcgi's approach is, Establishing a stand-alone fcgi process that communicates with the web hosting service process, which, once started, allocates resources, creates threads to respond to HTTP requests, and determines its life cycle, greatly reducing the resource overhead that the system makes in order to create processes. Modern popular Web server programs, such as PHP, ASP. NET, are basically fcgi implementations.

scgi = Simple CGI

It is the product of fcgi after streamlining the data protocol and response process. It is designed to accommodate an increasing number of Ajax-or rest-based HTTP requests and to make faster and more concise responses. and scgi Convention, when the server returns a response to an HTTP protocol request, close the HTTP connection immediately. So it is not difficult to see that scgi is more suitable for the "request-forget" mode of communication advocated by SOA in general sense.

WSGI = Web Server Gateway Interface

This protocol is a patent for the Python language, which defines a set of universally applicable interfaces for communication between the Web service Host program and the HTTP response agent. It was generated because Python programmers noticed that there was a serious coupling between the web framework and the web hosting server program, for example, that some frameworks were designed for Apache's Mod_python. As a result, WSGI defines a very low-level interface. Common Python Web frameworks implement this protocol: such as CherryPy, Django, web.py, Web2py, TurboGears, Tornado, pylons, Bluebream, Google App Engine[dubi Ous–discuss], Trac, Flask, Pyramid, et cetera.

CGI, FCGI, scgi, WSGI

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.