On Wed, Oct 24, 2012 at 10:58 AM, Fred <frdthe...@gmail.com> wrote:
> This article says:
>>
>> Although WSGI is the preferred deployment platform for Django, many people
>> use shared hosting, on which protocols such as FastCGI, SCGI or AJP are the
>> only viable options.
>
>
> I'm puzzled, because I seemed to understand that WSGI is an API that relies
> on a lower-level transport solution like FastCGI, SCGI, or AJP.

not exactly like that.  it's not about which is higher-level, or which
runs on top of what... i see it more like a chain of protocol
conversions.

at one end, it's WSGI, it's a standard, a convention of how to call
Python functions to implement web applications.  Django is implemented
as a WSGI application, so you need something that makes those WSGI
calls.

at the other end is the user browser, which does HTTP requests.

so, you need to translate HTTP requests to WSGI calls, and the
returned WSGI responses into HTTP responses.

there are HTTP-WSGI servers, like gunicorn, and tornado, and lots others.

there are also many HTTP servers that can use a multitude of back-end
protocols to talk to webapps.

Apache, for instance can do FastCGI.  if so, you can use flup to serve
FastCGI with WSGI calls.

or you could use mod_wsgi to skip flup and keep the HTTP-WSGI within
Apache.  (this is the recommended structure for Apache)

several other webservers can do FastCGI, like lighttp or nginx.  in
all those cases you can still use flup.

but nginx is also a quite good HTTP-HTTP load-balancer, so you can use
gunicorn to serve HTTP behind nginx.  this is a very popular setup.
or you can replace nginx with lighttp in proxy mode.

another very good alternative is uWSGI, which adapts several protocols
and calls WSGI apps (and others!).  It was originally designed to use
a very compact and efficient protocol, mainly driven by a mod_uwsgi
add-in for nginx.  this can be a very low-overhead, high-performance
option.  uWSGI also has many, many options to administer the whole
system with great detail.

hope that helps.

-- 
Javier

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to