scgi 和 wsgi 有什么区别? [英] What's the difference between scgi and wsgi?

查看:23
本文介绍了scgi 和 wsgi 有什么区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这两者有什么区别?哪个更好/更快/更可靠?

What's the difference between these two? Which is better/faster/reliable?

推荐答案

SCGI 是一种连接前端 Web 服务器和 Web 应用程序的语言中立方式.WSGI 是针对 Web 应用程序的 Python 特定接口标准.

SCGI is a language-neutral means of connecting a front-end web server and a web application. WSGI is a Python-specific interface standard for web applications.

虽然它们都起源于 CGI,但它们的范围相当不同,您确实可以非常合理地同时使用两者,例如,在网络服务器上使用 mod_scgi 与作为 SCGI 服务器运行的 WSGI 应用程序对话.有多种库实现可以将 WSGI 应用程序作为 SCGI 服务器运行(例如 wsgitools、cherrypy).

Though they both have roots in CGI, they're rather different in scope and you could indeed quite reasonably use both at once, for example having a mod_scgi on the webserver talk to a WSGI app run as an SCGI server. There are multiple library implementations that will run WSGI applications as SCGI servers for you (eg. wsgitools, cherrypy).

它们都是可靠的",与特定实现相反,您可以尽可能地认为规范是可靠的.现在,您可能会将应用程序编写为 WSGI 可调用对象,并单独考虑部署问题.

They are both 'reliable', in as much as you can consider a specification reliable as opposed to a particular implementation. These days you would probably write your application as a WSGI callable, and consider the question of deployment separately.

也许 Apache+mod_wsgi(嵌入式)接口可能比 Apache+mod_scgi+(SCGI 包装库)快 ,但很可能它不会很大em> 不同.更有价值的是能够在各种服务器、平台和连接标准上运行应用程序.

Maybe an Apache+mod_wsgi (embedded) interface might be a bit faster than an Apache+mod_scgi+(SCGI wrapper lib), but in all likelihood it's not going to be hugely different. More valuable is the ability to run the application on a variety of servers, platforms and connection standards.

这篇关于scgi 和 wsgi 有什么区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆