Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #65778 > unrolled thread

Python (?) webserver for WSGI

Started byNicholas Cole <nicholas.cole@gmail.com>
First post2014-02-09 21:05 +0000
Last post2014-02-09 22:29 +0000
Articles 3 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Python (?) webserver for WSGI Nicholas Cole <nicholas.cole@gmail.com> - 2014-02-09 21:05 +0000
    Re: Python (?) webserver for WSGI Asaf Las <roegltd@gmail.com> - 2014-02-09 13:33 -0800
      Python (?) webserver for WSGI Nicholas Cole <nicholas.cole@gmail.com> - 2014-02-09 22:29 +0000

#65778 — Python (?) webserver for WSGI

FromNicholas Cole <nicholas.cole@gmail.com>
Date2014-02-09 21:05 +0000
SubjectPython (?) webserver for WSGI
Message-ID<mailman.6600.1391979965.18130.python-list@python.org>
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.

[toc] | [next] | [standalone]


#65781

FromAsaf Las <roegltd@gmail.com>
Date2014-02-09 13:33 -0800
Message-ID<35c48ba6-6d1a-4e3b-a9a5-0b47f6c9ae83@googlegroups.com>
In reply to#65778
On Sunday, February 9, 2014 11:05:58 PM UTC+2, Nicholas wrote:
> 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

[toc] | [prev] | [next] | [standalone]


#65785

FromNicholas Cole <nicholas.cole@gmail.com>
Date2014-02-09 22:29 +0000
Message-ID<mailman.6605.1391984974.18130.python-list@python.org>
In reply to#65781

[Multipart message — attachments visible in raw view] — view raw

On Sunday, 9 February 2014, Asaf Las
<roegltd@gmail.com<javascript:_e(%7B%7D,'cvml','roegltd@gmail.com');>>
wrote:

> On Sunday, February 9, 2014 11:05:58 PM UTC+2, Nicholas wrote:
> > 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.
>

[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>

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web