Python (?) webserver for WSGI

N

Nicholas Cole

Dear List,

What is the latest "best-practice" for deploying a python wsgi
application into production?

For development, I've been using CherryPyWSGIServer which has been
working very well (and the code is small enough to actually ship with
my application). But I would like some way of deploying a server
listening on port 80 (and then dropping root privileges).

I have looked at using gunicorn + ngnix, but that gives me 3 layers
that I need to set up:

- my own application
- gunicorn
- ngnix

Compared to using something like CherryPyWSGIServer (where a single
line of code starts my application!) that seems like overkill and
rather complicated for a small application.

I'm not expecting 1000s of users (or even dozens!), but this is an
application that will be accessible to "the internet" and so server
security is a concern (which is why I don't want to use anything that
labels itself as a "development" webserver).

As far as I can tell, this is something of a fast-moving target. What
advice do people have? I'm using python 3, in case it makes a
difference.

Best wishes,

N.
 
A

Asaf Las

Dear List,



What is the latest "best-practice" for deploying a python wsgi
application into production?

For development, I've been using CherryPyWSGIServer which has been
working very well (and the code is small enough to actually ship with
my application). But I would like some way of deploying a server
listening on port 80 (and then dropping root privileges).

I have looked at using gunicorn + ngnix, but that gives me 3 layers
that I need to set up:

- my own application
- gunicorn
- ngnix

Yes, but are you after simplicity of setup or reliability?
If security is your concern - eventually you have to dive into
routines of verifying settings auditing etc and spend
week(s) if you have no solid prior experience in that field and even
after that there is still a lot to learn.

the interesting side of nginx is load balancing toward back end
so you can distribute your back ends over multiple machines and have
scalability for least effort, though seems you don't need due to
low expected load.
there is another popular choice nginx + uwsgi
 
N

Nicholas Cole

Yes, but are you after simplicity of setup or reliability?
If security is your concern - eventually you have to dive into
routines of verifying settings auditing etc and spend
week(s) if you have no solid prior experience in that field and even
after that there is still a lot to learn.

[snip]

Yes, I managed a large apache installation for some years. I suppose that
my hope was that in 2014 there might be some better, simpler way to run
smaller web applications, especially with the tulip async stuff becoming
part of the language. I don't think running a WSGI application to serve
basic requests should NEED a lot of special setting up</idealism>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top