I've made a small web app using web.py that I now want to put into production. I dont anticipate this will have very high concurrent use (probably max of 5 or so users at any given time, if that).
That said, I dont want to go with the cherry.py server that comes with web.py (and which i have been using for debugging), because one of my main motivations for the app was to learn how to properly put apps in production.
Reading up on options - there seems to be dizzying array of stuff. Tornoado, nginx, lighttpd etc etc. 开发者_如何转开发Also stuff like Gunicorn, which I cant quite grasp the use of so far.
It seems WSGI is the way to go - and I wanted some help with what would be an appropriate, relatively easy to administer setup that i can run on an EC2 instance (ubuntu), perhaps using nginx/wsgi. Specifically, do i need gunicorn (or equivalent), and are there any good intros anybody may know of so i can actually get my web.py code running and at least start to understand this jigsaw of various technologies/options?
Many thanks
Available options are:
- apache + mod_python
- apache + mod_wsgi
- lighttpd + mod_fastcgi
- lighttpd + gunicorn
- nginx + gunicorn
I suggest you to go for gunicorn.
CherryPy is a pretty good choice for deployment. It's a good WSGI server, and is known to work on EC2. Straightforward mapping of HTTP requests onto your python code. I have run it behind Apache, behind lighttpd, and by itself.
I suggest you use Apache + modpython. Even though you expect less load, it's always good to be prepared :)
Plus this is a tried and tested setup.
精彩评论