CGI,FastCGI,SCGI,WSGI再糅上一堆mod_xxx组件,有些“搞”!
CGI,泛语言些动态Web应用协议
FastCGI,与CGI的区别始线程策略,作为一种替代cgi的技术标准, fastcgi有如下优点(稳定,安全,高性能,方便扩展)
从稳定性上看, fastcgi是以独立的进程池运行来cgi,单独一个进程死掉,系统可以很轻易的丢弃,然后重新分配新的进程来运行逻辑.
从安全性上看, fastcgi和宿主的server完全独立, fastcgi怎么down也不会把server搞垮,
从性能上看, fastcgi把动态逻辑的处理从server中分离出来, 大负荷的IO处理还是留给宿主server, 这样宿主server可以一心一意作IO,对于一个普通的动态网页来说, 逻辑处理可能只有一小部分, 大量的图片等静态IO处理完全不需要逻辑程序的参与(注1)
从扩展性上讲, fastcgi是一个中立的技术标准, 完全可以支持任何语言写的处理程序(php,java,python...)
WSGI,WSGI is the Web Server Gateway Interface. It is a specification for web servers and application servers to communicate with web applications (though it can also be used for more than that). It is a Python standard, described in detail in PEP 333.
SCGI,The SCGI protocol is a replacement for the Common Gateway Interface (CGI) protocol. It is a standard for applications to interface with HTTP servers. It is similar to FastCGI but is designed to be easier to implement. [区别FastCGI的是Python开发的]