Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between scgi and wsgi?

Tags:

python

wsgi

scgi

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

like image 631
daniels Avatar asked Nov 02 '08 22:11

daniels


1 Answers

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.

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).

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.

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.

like image 105
bobince Avatar answered Oct 02 '22 14:10

bobince