Cgi,fastcgi,scgi,wsgi Difference

Source: Internet
Author: User
Tags hosting web hosting
CGI = Common Gateway Interface As the name suggests, it is an interface specification. This specification defines in detail the server Agent running in the Web server, how to obtain and return the server environment context and the parameter names in the HTTP protocol in the process of Web page generation, as everyone knows: Request_method,query_string,content_ Type, and so on. The vast majority of Web server programs act as scripts to accept and process HTTP requests and return HTTP pages or responses. These scripting programs are well-known PHP, ASP, JSP, and so on.
fcgi = Fast CGI It's actually a variant of CGI in concrete implementations. The idea is to achieve the ultimate goal of improving Web service performance by reducing the communication overhead of the CGI agent and the web hosting service program. This shows that the fcgi is not different from the CGI, but the specific implementation of the method has been improved: the CGI approach is that for each HTTP request, the web hosting service creates a new process to invoke the server script, corresponding to the request; fcgi's approach is, Establish a separate fcgi service process that communicates with the web hosting service process, which greatly reduces the resource overhead of the system in order to create a process once it has been started, allocating resources, creating threads to respond to HTTP requests, and determining its own lifecycle. Modern popular Web server programs, such as PHP, ASP.net, are basically the implementation of fcgi.
scgi = Simple CGI It is the product of fcgi after streamlining data protocols and response processes. It is designed to accommodate more and more Ajax or rest-based HTTP requests, and to make faster and simpler responses. Also, the SCGI Convention closes the HTTP connection immediately after the server returns a response to an HTTP protocol request. So it's not hard to see that scgi is more suited to the "request-forget" mode of communication that SOA advocates in the 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 WEB service hosting programs and HTTP response agents. It came about because Python programmers noticed serious coupling between web frameworks and Web hosting server programs, for example, some of the frameworks were designed for Apache Mod_python. As a result, WSGI defines a very low level of interface. The common Python Web framework implements this protocol:  cherrypy, Django, web.py, Web2py, TurboGears, Tornado, pylons, Bluebream, Google App engin E[dubious–discuss], Trac, flask, pyramid, and so on.

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.